编译安装php,出现make: *** [sapi/cli/php] Error 1解决办法
2014-11-24 15:32
639 查看
今天在编译安装php的时候,出现了一个问题,我这种查资料,找到了几种办法,但是我试验了,是不正确的,最终我是修改了变异时候的路径,解决了问题。
我编译安装php的参数如下:
./configure --prefix=/usr/local/php5.4.6 --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir=/usr/local/freetype --with-gd=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-iconv=/usr/local/libiconv-1.14 --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir=/usr/local/libxml2 --enable-gd-native-ttf --enable-zip --enable-fastcgi --enable-fpm
当我make的时候,报错如下所示:
collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
解决办法:
libxml默认安装的路径是/usr/local,我把--with-libxml-dir=/usr/local/libxml2修改成了--with-libxml-dir=/usr/
修改后的编译参数:
./configure --prefix=/usr/local/php5.4.6 --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir=/usr/local/freetype --with-gd-dir=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-iconv-dir=/usr/local/libiconv-1.14 --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir=/usr/ --enable-gd-native-ttf --enable-zip --enable-fastcgi --enable-fpm
我重新编,重新make && make install 没有问题。
编译安装好之后,启动fpm。然后,整合nginx和php-fpm,并且平滑重启nginx。
出现测试界面,如图所示:
本文出自 “岁月在流逝,光辉依然在” 博客,请务必保留此出处http://taokey.blog.51cto.com/4633273/1581956
我编译安装php的参数如下:
./configure --prefix=/usr/local/php5.4.6 --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir=/usr/local/freetype --with-gd=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-iconv=/usr/local/libiconv-1.14 --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir=/usr/local/libxml2 --enable-gd-native-ttf --enable-zip --enable-fastcgi --enable-fpm
当我make的时候,报错如下所示:
collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
解决办法:
libxml默认安装的路径是/usr/local,我把--with-libxml-dir=/usr/local/libxml2修改成了--with-libxml-dir=/usr/
修改后的编译参数:
./configure --prefix=/usr/local/php5.4.6 --with-mysql=/usr/local/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir=/usr/local/freetype --with-gd-dir=/usr/local/gd --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-iconv-dir=/usr/local/libiconv-1.14 --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir=/usr/ --enable-gd-native-ttf --enable-zip --enable-fastcgi --enable-fpm
我重新编,重新make && make install 没有问题。
编译安装好之后,启动fpm。然后,整合nginx和php-fpm,并且平滑重启nginx。
出现测试界面,如图所示:
本文出自 “岁月在流逝,光辉依然在” 博客,请务必保留此出处http://taokey.blog.51cto.com/4633273/1581956
相关文章推荐
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 转:安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 转 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- php编译安装报错:make: *** [sapi/cli/php] Error 1 解决办法
- 安装PHP出现make: *** [sapi/cli/php] Error 1 解决办法
- 2010-06-13 16:39 make: *** [sapi/cli/php] Error 1 解决办法
- make: *** [sapi/cli/php] Error 1 解决办法
- make: *** [sapi/cli/php] Error 1 解决办法
- make: *** [sapi/cli/php] Error 1 解决办法
- 编译php 出现 make: *** [ext/mysqli/mysqli.lo] Error 1 错误的解决办法
- make: *** [sapi/cli/php] Error 1 解决办法
- 在Linux下安装PHP过程中,编译时出现configure: error: libjpeg.(a|so) not found 错误的解决办法
- make: *** [sapi/cli/php] Error 1 安装php的时候出现
- make: *** [sapi/cli/php] Error 1 解决办法