checking size of long int... (cached) 8
configure: error: Cannot find ldap libraries in /usr/lib.
解決: php
./configure php的時候出現下面錯誤而退出api
configure: error: Cannot find ldap libraries in /usr/lib 解決辦法: cp -frp /usr/lib64/libldap* /usr/lib/ 而後再./configure ...便可
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup'//usr/lib64/liblber-2.4.so.2: error adding symbols: DSO missing from command line spa
collect2: error: ld returned 1 exit status code
make: *** [sapi/cli/php] Error 1orm
解決:源碼
解決辦法:遇到這種相似的狀況,說明「./configure 」沒抓好一些環境變數值。解決方法,來自老外的一篇文章:
在PHP源碼目錄下 vi Makefile 找到 EXTRA_LIBS 行,在行末添加 ‘ -llber ‘ 保存退出再次make便可
it
/usr/local/src/php-7.2.7/sapi/cli/php: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directorymake: *** [ext/phar/phar.php] Error 127
解決:
1.先#vi /etc/ld.so.conf 編譯
在裏面加上一行 /usr/local/lib class
2.而後運行/sbin/ldconfig cli
#/sbin/ldconfig
編譯make
Generating phar.phar
chmod: cannot access ‘ext/phar/phar.phar’: No such file or directory
make: [ext/phar/phar.phar] Error 1 (ignored)
解決:
cd ext/phar/