天天看點

make: *** [ext/mysqli/mysqli.lo] Error 1

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

錯誤:make: *** [ext/mysqli/mysqli.lo] error 1

[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'

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 test

#make install