安装php no permision,php5.3安装过程中遇到的问题

1:php5.3.24 版本的和php5.2.*版本的编译参数不同

我在php5.2.*中使用的编译参数如下:

./configure  --prefix=/usr/local/php  --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config  --with-iconv-dir --with-freetype-dir  --with-jpeg-dir --with-png-dir   --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-safe-mode  --enable-bcmath --enable-shmop  --enable-sysvsem  --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi  --enable-force-cgi-redirect  --enable-mbstring  --with-mcrypt --with-gd  --enable-gd-native-ttf  --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl  --with-xmlrpc --enable-zip --enable-soap --with-apxs2=/usr/local/apache/bin/apxs

当我同样将该参数放到php5.3.24下编译有如下提示:

在configure php5.3.24时发现

Notice: Following unknown configure options were used:

--enable-discard-path

--enable-fastcgi

--enable-force-cgi-redirect

Check './configure --help' for available options

confiugre里面没有这几个参数了!

2:make test时出错:

[root@centos5xen php-5.3.24]# make test

Build complete.

Don't forget to run 'make test'.

Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_CLIENT' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 98Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_AUTH_SOCK' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 99Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_TTY' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 100Warning: putenv(): Safe Mode warning: Cannot set environment variable 'SSH_CONNECTION' - it's not in the allowed list in /home/liuxiaojie/php-5.3.24/run-tests.php on line 101Warning: set_time_limit(): Cannot set time limit in safe mode in /home/liuxiaojie/php-5.3.24/run-tests.php on line 104-----------------------------------------------------------|                       ! WARNING !                         |

| You are running the test-suite with 'safe_mode' ENABLED ! |

|                                                           |

| Chances are high that no test will work at all,           |

| depending on how you configured 'safe_mode' !             |

-----------------------------------------------------------

ERROR: invalid PHP executable specified by TEST_PHP_EXECUTABLE  = /home/liuxiaojie/php-5.3.24/sapi/cli/php

解决方法:这个错误可以忽略,直接make install 即可!

3:安装memcache时遇到的问题

安装php扩展memcache时遇到问题:

checking target system type... i686-pc-linux-gnu

configure: error: Cannot find php-config. Please use --with-php-config=PATH

解决方法:

./configure --with-php-config=/usr/local/php/bin/phpconfig

4:configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决方法:

yum -y install libmcrypt-devel

5:onfigure: error: Please reinstall libmhash - I cannot find mhash.h

解决方法:yum -y install mhash-devel

6:php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file

解决方法:

echo '/usr/local/mysql/lib' >>/etc/ld.so.confs

ldconfig -v 即可

7:Cannot load modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: unixd_config

原因:php5.2的版本和httpd-2.4 不匹配!

老外的两个回答如下:

The reason you're having this issue is because it seems PHP 5.2 isn't compatible with Apache 2.4 because it's using a (now) deprecated Apache API. The developers at PHP

are no longer supporting 5.2, and thus it is unlikely that there will be any updates to rectify this in the future.Your options are to either change PHP versions, or remain at Apache 2.2.

Hi,

I guess that the the php version you're trying to install is not aware of the changes made in apache-2.3.x

Why don't you try to install the latest php-5.3.9 instead of the old 5.2.17 that is no longer supported.

8:

configure: error: Cannot find ldap libraries in /usr/lib.

其实我相关软件已经安装了:

[root@localhost ~]# rpm -qa | grep ldap

openldap-2.4.23-32.el6_4.x86_64

openldap-devel-2.4.23-32.el6_4.x86_64

[root@localhost ~]#

解决方法:

cp -frp /usr/lib64/libldap* /usr/lib/

9:/bin/sh: /home/liuxiaojie/install/php-5.3.24-src/build/shtool: Permission denied

/bin/sh: -d: command not found

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

解决方法:

[root@localhost build]# pwd

/home/liuxiaojie/install/php-5.3.24-src/build

[root@localhost build]# chmod  a x shtool

[root@localhost build]#

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

[root@localhost php-5.3.24-src]# make

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

解决方法:

此处可以忽略,但可以解决:

解决方法:如下

/home/liuxiaojie/install/php-5.3.24-src/ext/phar

cp  phar.php  phar.phar

11:configure: error: mcrypt.h not found. Please reinstall libmcrypt. ##安装mcrypt扩展时报错

解决方法:

tar zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

./configure

make

make install

12:configure: error: not found. Please reinstall the expat distribution.

其实已经安装了expat 和expat-devel

解决方法:

ln -sv /lib64/libexpat.* /lib/

ln -sv /usr/lib64/libexpat.* /usr/lib/

13:configure php时报错如下:

-bash: ./configure: Permission denied:

解决方法:

chmod a x configure

14:configure: error: Unable to locate gmp.h:

解决方法:

yum -y install gmp-devel

15:Cannot find config.m4.

[root@localhost install]# /usr/local/webserver/php/bin/phpize

Cannot find config.m4.

Make sure that you run '/usr/local/webserver/php/bin/phpize' in the top level source directory of the module

故障原因:

目录的位置错了, 应该在APC-1.*所在的目录

16: ##转载的,试过了,确实可以解决问题

/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_pvt_opt_on@@OPENLDAP_2.4_2'

/usr/bin/ld: note: 'ber_pvt_opt_on@@OPENLDAP_2.4_2' is defined in DSO /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 so try adding it to the linker command line

/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: could not read symbols: Invalid operation

搜索了好久在老外的一篇文章中终于找到解决办法

-Run your configure command

-edit Makefile

-Find the line that starts with 'EXTRA_LIBS ='

-Add the following to the end of the line ' -llber'

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值