我自己配置了 PHP,包含了我需要的所有库...但后来意识到我忘记了 freetype 库。
所以我回到 php-5.3.2 目录并运行 ./configure '--with-free-type=/usr/local/lib'
PHP 的配置很好,没有错误。
但是当我运行 make 时:
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
经常出现的事情:
/php-5.3.2/ext/libxml/libxml.c:336: undefined reference to `ts_resource_ex'
/php-5.3.2/ext/sqlite3/sqlite3.c:663: undefined reference to `executor_globals_id'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_final':
/php-5.3.2/ext/sqlite3/sqlite3.c:811: undefined reference to `ts_resource_ex'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_step':
/php-5.3.2/ext/sqlite3/sqlite3.c:799: undefined reference to `ts_resource_ex'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_callback_func':
/php-5.3.2/ext/sqlite3/sqlite3.c:788: undefined reference to `ts_resource_ex'
ext/sqlite3/.libs/sqlite3.o: In function `php_sqlite3_authorizer':
/php-5.3.2/ext/sqlite3/sqlite3.c:1782: undefined reference to `ts_resource_ex'
/php-5.3.2/ext/sqlite3/sqlite3.c:1787: undefined reference to `core_globals_id'
ext/sqlite3/.libs/sqlite3.o: In function `zim_sqlite3_open':
/php-5.3.2/ext/sqlite3/sqlite3.c:161: undefined reference to `core_globals_id'
/php-5.3.2/ext/sqlite3/sqlite3.c:123: undefined reference to `core_globals_id'
未定义的引用有多种原因。
所以它在这里失败了,但当我最初编译 PHP 时却没有。这是怎么回事?我需要重新配置整个事情吗?
提前致谢。
你应该使用--with-freetype-dir instead http://libgd.org/FAQ_PHP#How_do_I_get_gd_to_work_with_PHP.3F带有 freetype 安装前缀的路径:--with-freetype-dir=/usr/local
在你的情况下。
当您进行干净的构建时,编译错误应该消失(make clean
, configure
, make
).
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)