FreeBSD make error文件5.19仅支持12版魔术文件。 /usr/share/misc/magic.mgc是版本8

时间:2014-12-12 14:29:09

标签: makefile freebsd proftpd

我在FreeBSD 10.1设置上重新安装ProFTPD时遇到问题。服务器从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的支持,则进程和安装成功。 但我相信某些事情仍然存在?

我的编程技巧有限,而且这个级别的错误。 如果您有任何想法,请告诉我,

谢谢,

2 个答案:

答案 0 :(得分:1)

首先,proftpd 1.3.5作为二进制包提供,以这种方式安装起来要简单得多(pkg install proftpd)。

第二 - 起初它看起来像一个端口bug;正如Etan所说,有一个shell语法错误(比如'[x == y]'而不是'[x = y]');这些是常见的,端口包含修复它们的补丁。但是,有一个二进制包,并且包是从ports(“make package”)构建的,因此port显然可以在包构建机器上运行。所以它可能是您的环境特有的东西。

如果你真的想从ports构建,试试这个:首先,重新安装pcre。由于某种原因,它必须重建,但无法安装,因为它已经安装。所以,“cd / usr / ports / * / pcre&& make clean all deinstall reinstall”。那应该摆脱第二个错误。然后回到“../*/proftpd”,看看它走了多远。

但实际上,我先尝试打包。它们与旧的pkg_add系统没有任何共同之处,并且真的很好。

答案 1 :(得分:1)

freebsd-update diff for FreeBSD-SA-14:28.file似乎错了,它会破坏文件(1)。

因此,pkg install file只是一种解决方法。