PHP編譯,執行make報錯

weixin_33766168發表於2017-11-27

編譯安裝php 的時候, 執行make報錯誤

make: *** [ext/phar/phar.php] 錯誤 127


[root@localhost php-5.4.9]# mkdir /usr/local/webserver/mysql/include/mysql

 [root@localhost php-5.4.9]# ln -s /usr/local/webserver/mysql/include/* /usr/local/webserver/mysql/include/mysql

 [root@localhost php-5.4.9]# make ZEND_EXTRA_LIBS='-liconv'

拋錯:

Generating phar.phar

/usr/local/src/php-5.4.9/sapi/cli/php: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

make: *** [ext/phar/phar.php] Error 127


解決的方法如下:

#vi /etc/ld.so.conf

在裡面加上一行

/usr/local/lib

2.然後執行/sbin/ldconfig

#/sbin/ldconfig

編譯make

#make ZEND_EXTRA_LIBS='-liconv'

拋錯:

Generating phar.phar

chmod: cannot access `ext/phar/phar.phar': No such file or directory

make: [ext/phar/phar.phar] Error 1 (ignored)


Build complete.

Don't forget to run 'make test'.

此處可以忽略 不過解決辦法如下

#cd  ext/phar/

#cp ./phar.php  ./phar.phar

然後到php5.4資料夾

#make ZEND_EXTRA_LIBS='-liconv'

#make test

#make install



本文轉自 維度2018 51CTO部落格,原文連結:http://blog.51cto.com/xinsz08/1795767,如需轉載請自行聯絡原作者

相關文章