Ошибка FreeBSD - Файл 5.19 поддерживает только магические файлы версии 12. /usr/share/misc/magic.mgc это версия 8?

785
Alldo

У меня проблемы с переустановкой ProFTPD в настройке FreeBSD 10.1. Сервер обновлен с 10.0 до 10.1. Когда я запускаю процесс make install clean, эти предупреждения сначала отображаются на экране.

===> proftpd-1.3.5_4 depends on shared library: libpcre.so /usr/share/misc/magic, 93: Warning: Printf format `l' is not valid for type `lelong' in description `, %ld pages' ... /usr/share/misc/magic, 15118: Warning: Printf format `l' is not valid for type `belong' in description `Volume %ld,' /usr/share/misc/magic, 15609: Warning: Current entry does not yet have a description for adding a MIME type file: File 5.19 supports only version 12 magic files. `/usr/share/misc/magic.mgc' is version 8 [: =: unexpected operator - not found 

И через некоторое время процесс make останавливается с этой ошибкой:

/bin/ln -s libpcre.so.1 /usr/ports/devel/pcre/work/stage/usr/local/lib/libpcre.so.3 ====> Compressing man pages (compress-man) ===> Installing for pcre-8.35_2 ===> Checking if pcre already installed ===> pcre-8.35_2 is already installed You may wish to ``make deinstall'' and install this port again by ``make reinstall'' to upgrade it properly. If you really wish to overwrite the old port of pcre without deleting it first, set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line.  *** Error code 1  Stop. make[3]: stopped in /usr/ports/devel/pcre *** Error code 1  Stop. make[2]: stopped in /usr/ports/devel/pcre *** Error code 1  Stop. make[1]: stopped in /usr/ports/ftp/proftpd *** Error code 1  Stop. make: stopped in /usr/ports/ftp/proftpd 

Кажется, файл /usr/share/misc/magic.mgc имеет неправильную версию? Это может произойти, когда я обновлялся с 10.0-RELEASE-p12 до 10.1-RELESE-p1?

Если я запускаю make install clean из порта ProFTP и отключаю поддержку pcre, процесс и установка успешны. Но я верю, что что-то все еще сломано?

Мои навыки программирования ограничены, а также этот уровень ошибок. Пожалуйста, дайте мне знать, если у вас есть идеи,

Спасибо,

0

1 ответ на вопрос

2
Roland Smith

The dependency checking in the ports Makefiles uses file(1) to check that a file is a shared library.

It seems like your magic database which is what file uses to determine file type is broken. You can recreate it as follows, assuming you have the FreeBSD source code installed.

First, create the total database in text format;

cat /usr/src/contrib/file/magic/Header \ /usr/src/contrib/file/magic/Localstuff \ /usr/src/contrib/file/magic/Magdir/* >magic 

Then compile it;

file -C magic 

Now install both in their default location. This needs to be done as root;

install -m 644 magic magic.mgc /usr/share/misc/