有关编译安装php和php-fpm时出现的问题


首先安装的是php5.16版本的,需要另外安装php-fpm,结果安装半天还是有问题。改安装php5.3版本,因为自带了fpm模块,直接编译上去就行了。
编译php,
./configure 
    --with-iconv-dir=/usr/local/\
    --with-freetype-dir\
    --with-jpeg-dir\
    --with-png-dir\
    --with-zlib\
    --with-mhash\
    --enable-sockets\
    --enable-ftp\
    --with-libxml-dir\
    --enable-xml\
    --disable-rpath\
    --enable-safe-mode\
    --enable-bcmath\
    --enable-shmop\
    --enable-sysvsem\
    --enable-inline-optimization\
    --with-curl\
    --with-curlwrappers\
    --enable-mbregex\
    --enable-mbstring\
    --with-mcrypt\
    --with-gd\
    --enable-gd-native-ttf\
    --with-openssl\
    --with-mhash\
    --enable-pcntl\
    --enable-sockets\
    --with-ldap\
    --with-ldap-sasl\
    --enable-fpm\
    --with-xmlrpc\
    --enable-zip\
    --enable-soap\
    --without-pear
结果make的时候就会出现如下错误:
libtool: link: `sapi/fpm/fpm/fpm_children.lo' is not a valid libtool object


查找了一下,说是libtool版本太低,自己查了一下自己版本,是2005年的版本,于是安装了一个2010年的版本,重新编译,make的时候,还是出现原来错误!


有人说是使用make realclean命令,结果尝试了一下
make * realclean /安装包的目录
结果没有什么作用

从网上找来了这段命令的介绍, http://www.ccp4.ac.uk/peter/programming/makefile-targets.html
Makefile Targets

Below are some empirical definitions of what each of the "standard" Makefile targets (clean, realclean, distclean and uninstall) should do:

    make clean - removes core, *.o, *~, a.out, *.orig, *.rej plus any other files created by the building of the program(s) (except of course the executable(s))
    make realclean - does make clean plus it removes the executables from the build directory
    make distclean - does make realclean plus removes Makefile, config.* files, C source files produced by configure and so on. Basically, after distclean only the originally distributed files should be left behind
    make uninstall - delete all installed files created by the install target. That's all, and doesn't depend on any of the other targets, so not actually as serious as it sounds.

So in principle the complete clean-up-for-starting-over prescription is (in top CCP4 directory) to do:

> make uninstall
> make distclean






最后尝试了一下 make distclean
没有报错,接着重新编译,make,竟然过去了,然后make install
完成后 ,检查了一下 pfm的安装状态
/usr/local/sbin/php-fpm -t

结果出现如图错误:

于是cp /var/php-5.3.13/sapi/fpm/php-fpm.conf  /usr/local/etc/
再测时,已经可以运行了。
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页