Ports方式安装软件出现has known vulnerabilities错误信息的解决方案

默认通过ports方式安装软件通常Vulnerability检查是Disabled的,但有些版本的FreeBSD或pkginstaller预设是要检查Vulnerability的,相关信息可以参阅/usr/ports/Mk/bsd.port.mk文件。
举例如果安装php5-extensions时选择了EXIF support选项,可能会提示以下错误:
php5-exif-5.3.5 has known vulnerabilities:
=> php — crash on crafted tag in exif.
Reference: http://portaudit.FreeBSD.org/cc3bfec6-56cd-11e0-9668-001fd0d616cf.html
=> Please update your ports tree and try again.
*** Error code 1

Stop in /usr/ports/graphics/php5-exif.
*** Error code 1

Stop in /usr/ports/lang/php5-extensions.
*** Error code 1

以上错误的意思是php-5.3.5软件有安全性漏洞,php5-exif拒绝安装,所以php5-extensions也没办法继续安装了。
登陆http://portaudit.FreeBSD.org/cc3bfec6-56cd-11e0-9668-001fd0d616cf.html了解,发现PHP before 5.3.6 on 64-bit platforms performs an incorrect cast。

解决办法:
(1)升级ports tree后再继续安装;
(2)通过make -DDISABLE_VULNERABILITIES参数强制安装,但是不建议这么做,因为有安全性漏洞!