php make test 错误127,php make test 解决

  • Post author:
  • Post category:php


1.解压文件夹:root@ubuntu:~$ tar -xvf php-5.3.3.tar.gz

2.进入php-5.

3.3文件夹:root@ubuntu:~$ cd php-5.3.3

3.直接命令root@ubuntu:/usr/local/web/php-5.3.3# ./configure

–prefix=/usr/local/web/php5 –with-apxs2=/usr/local/web/apache2/bin/apxs

会提示:configure: error: xml2-config not found. Please check your libxml2 installation.

4.root@ubuntu:/usr/local/web/php-

5.3.3# sudo apt-get install libxml2

将会提示下列信息:

libxml2 已经是最新的版本了。

下列软件包是自动安装的并且现在不需要了:

linux-headers-2.6.32-21 linux-headers-2.6.32-21-generic

5.root@ubuntu:/usr/local/web/php-5.3.3# sudo apt-get install libxml2-dev

提示:需要下载 913kB 的软件包。

解压缩后会消耗掉 2,548kB 的额外空间。

您希望继续执行吗?[Y/n]y

6.按Y键就行了。。。

7.重新编译:root@ubuntu:/usr/local/web/php-5.3.3# ./configure

–prefix=/usr/local/web/php5 –with-apxs2=/usr/local/web/apache2/bin/apxs 编译完成后将会看到“Thank you for using PHP.”的字样,表明PHP已经配置成功了

8.接着是:make

提示:Don’t forget to run ‘make test’.

9.命令:make test

提示:Do you want to send this report now? [Yns]: n

按N。

10.make install

最后一部就是配置到apache 里

直接vi /usr/local/web/apache2/httpd.conf(linux vi命令详解)

找到:DirectoryIndex index.html