gpt4 book ai didi

php - 在 FreeBSD 8.3 上安装 php5-gd 时出错(共享库 "png.6"不存在)

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:42:04 26 4
gpt4 key购买 nike

我将 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 库

# 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 - 但它也没有帮助。知道如何正确避免此错误吗?

最佳答案

重建 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 以使其正常工作。

关于php - 在 FreeBSD 8.3 上安装 php5-gd 时出错(共享库 "png.6"不存在),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15344815/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com