繁体   English   中英

在Ubuntu的LAMPP中将PHP从5.5升级到5.6

[英]Upgrade PHP to 5.6 from 5.5 in LAMPP for Ubuntu

Ubuntu版本:14.04

在PHP5.5的/ opt / lampp下已有LAMPP安装

我只需要更新到PHP 5.6。 遵循以下步骤,但在make install步骤中失败

cd ~/downloads
wget http://ar2.php.net/distributions/php-5.6.17.tar.gz
tar -xzf php-5.6.17.tar.gz
sudo mv php-5.6.17 /usr/src/php-5.6.17

/ opt / lampp / bin / php --info | grep“配置命令”

./configure  --prefix=/opt/lampp --with-apxs2=/opt/lampp/bin/apxs --with-config-file-path=/opt/lampp/etc --with-mysql=mysqlnd --enable-inline-optimization --disable-debug --enable-bcmath --enable-calendar --enable-ctype --enable-ftp --enable-gd-native-ttf --enable-magic-quotes --enable-shmop --disable-sigchild --enable-sysvsem --enable-sysvshm --enable-wddx --with-gdbm=/opt/lampp --with-jpeg-dir=/opt/lampp --with-png-dir=/opt/lampp --with-freetype-dir=/opt/lampp --with-zlib=yes --with-zlib-dir=/opt/lampp --with-openssl=/opt/lampp --with-xsl=/opt/lampp --with-ldap=/opt/lampp --with-gd --with-imap=/bitnami/xamppunixinstallerstackDev-linux-x64/src/imap-2007e --with-imap-ssl --with-gettext=/opt/lampp --with-mssql=/opt/lampp --with-sybase-ct=/opt/lampp --with-mysql-sock=/opt/lampp/var/mysql/mysql.sock --with-oci8=shared,instantclient,/opt/lampp/lib/instantclient --with-mcrypt=/opt/lampp --with-mhash=/opt/lampp --enable-sockets --enable-mbstring=all --with-curl=/opt/lampp --enable-mbregex --enable-zend-multibyte --enable-exif --with-bz2=/opt/lampp --with-sqlite=shared,/opt/lampp --with-sqlite3=/opt/lampp --with-libxml-dir=/opt/lampp --enable-soap --enable-pcntl --with-mysqli=mysqlnd --with-pgsql=shared,/opt/lampp/ --with-iconv=/opt/lampp --with-pdo-mysql=mysqlnd --with-pdo-pgsql=/opt/lampp/postgresql --with-pdo-sqlite --with-icu-dir=/opt/lampp --enable-fileinfo --enable-phar --enable-zip --enable-intl

然后完成-

./configure [ whole above command ]
make 

运行make install会出错-

Installing PHP SAPI module:       apache2handler
apxs:Error: Command failed with rc=65536
make: *** [install-sapi] Error 1
$ ./configure --prefix=/home/username/php --with-apxs2=/usr/bin/apxs2
$ mkdir /home/username/php/etc/apache2/mods-available
$ make
$ INSTALL_ROOT=/home/username/php PATH=/usr/sbin:$PATH make install

1)--prefix是将大多数PHP安装在主目录下所必需的。

2)--with-apxs2对于告诉PHP在哪里找到apxs2是必要的。 由于某种原因(可能存在--prefix),即使apxs2在$ PATH中,也必须指出这一点。

3)mkdir是创建apxs2将放置PHP模块.load文件的目录所必需的。

4)INSTALL_ROOT是一个未记录的变量,它将覆盖由于某些原因不符合--prefix的某些安装位置。

5)在a2enmod不在普通用户的$ PATH中的系统上,必须将/ usr / sbin添加到$ PATH中。

http://blog.thecybershadow.net/2013/01/25/installing-php-and-apache-module-under-home/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM