1

我将 php 更新到 5.3。但我无法安装 gd 扩展(在 freebsd 8.3 上)
错误行:

# cd /usr/ports/graphics/php5-gd/
# make install clean
===>   php5-gd-5.3.11 depends on file: /usr/local/bin/phpize - found
===>   php5-gd-5.3.11 depends on file: /usr/local/bin/autoconf-2.69 - found
===>   php5-gd-5.3.11 depends on shared library: freetype.9 - found
===>   php5-gd-5.3.11 depends on shared library: png.6 - not found
===>    Verifying install for png.6 in /usr/ports/graphics/png
===>   Returning to build of php5-gd-5.3.11
Error: shared library "png.6" does not exist
*** Error code 1

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

我尝试更新并安装 png lib

# cd /usr/ports/graphics/png/
# make deinstall
# cd make install clean

然后我看到:

100% tests passed, 0 tests failed out of 2

Total Test time (real) =  25.96 sec
===>  Installing for png-1.5.10
===>   Generating temporary packing list
===>  Checking if graphics/png already installed
===>   png-1.5.10 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 graphics/png
  without deleting it first, set the variable "FORCE_PKG_REGISTER"
  in your environment or the "make install" command line.
*** Error code 1

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

如果我从指令 FORCE_PKG_REGISTER 开始 - '"png.6" 不存在' 再次出现。我做到了portupgrade- 但它也没有帮助。任何想法如何正确避免此错误?

4

2 回答 2

0

重建 ldconfig 提示文件。注意: /etc/ld.so.conf 和 /etc/ld-elf.so.conf 在 FreeBSD 上似乎没有做任何事情。

过时提示文件错误如下所示(当正确的共享库实际存在时):

Shared object "libintl.so.8" not found, required by "vim"

所以,你必须运行这个丑陋的命令:

 ldconfig /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat /usr/local/lib/compat/pkg /usr/local/lib/graphviz /usr/local/lib/mysql /usr/local/lib/nss /usr/local/lib/pth /usr/local/share

也许还有另一种配置 ld/ldconfig 的方法,以便它可以正常工作。

于 2015-02-07T08:50:56.557 回答
-1

libpng 的共享库的名称是/usr/local/lib/libpng15.so.15,至少在 FreeBSD 9 上是这样。

出于某种原因 php-gd 没有选择它。也许它认为你在 Linux 上?

确保您的端口树是最新的。libpng 的当前版本是 1.5.14。

于 2013-03-13T07:20:40.340 回答