PHP编译,执行make报错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了PHP编译,执行make报错相关的知识,希望对你有一定的参考价值。

编译安装php 的时候, 执行make报错误

make: *** [ext/phar/phar.php] 错误 127


[[email protected] php-5.4.9]# mkdir /usr/local/webserver/mysql/include/mysql

 [[email protected] php-5.4.9]# ln -s /usr/local/webserver/mysql/include/* /usr/local/webserver/mysql/include/mysql

 [[email protected] 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


本文出自 “辛舒展” 博客,请务必保留此出处http://xinsz08.blog.51cto.com/10565212/1795767

以上是关于PHP编译,执行make报错的主要内容,如果未能解决你的问题,请参考以下文章

源码编译php-5 报错整理

php7.2.29编译openssl报错?

编译安装php5.6.30报错

php编译安装执行make时报错: make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

php编译安装报错

php5.6编译yaf3.0.6报错,版本问题