本日志为双语版本,解决办法来自我的同事广峰,附上他的博客(GF blog:https://www.gfzj.us/)
This article have Chinese and English version.
中文版解决办法(操作系统:ubuntu):
以下操作前提是已有lampp并且已经具备编译功能,没有安装编译器的请执行以下指令安装好编译器再继续:
sudo apt-get install build-essential
sudo apt-get install libxml2-dev
1.下载lampp开发包(https://www.Apachefriends.org/download.php xampp-linux-devel-1.8.1.tar.gz)
2.上传xampp-linux-devel-1.8.1.tar.gz到opt目录
3.下载最新php(https://ar2.php.net/distributions/php-5.4.16.tar.gz)。
4.上传php-5.4.16.tar.gz到opt目录
5.进入opt目录
cd /opt
6.解压开发包和php-5.4.16.tar.gz
tar xf xampp-linux-devel-1.8.1.tar.gz -C /opt
tar xf php-5.4.16.tar.gz -C /opt
7.进入目录php-5.4.16。
cd php-5.4.16
8.进行编译
./configure --prefix=/opt/lampp/php-5.4.16 --enable-fpm --with-apxs2=/opt/lampp/bin/apxs --with-mysql=mysqlnd --with-zlib=yes --with-zlib-dir=/opt/lampp --with-mysql-sock=/opt/lampp/var/mysql/mysql.sock --enable-mbstring=all --with-curl=/opt/lampp --enable-mbregex --with-mysqli=mysqlnd --with-iconv --with-pdo-mysql=mysqlnd --with-pdo-sqlite --with-libxml-dir=/opt/lampp
9.执行如下指令编译并安装
make
sudo make install
10.重启xampp
/opt/lampp/lampp restart
The following premise is you must already have lampp(https://www.Apachefriends.org/download.php xampp-linux-1.8.1.tar.gz) in /opt
And already has compiled function, if the compiler is not installed, please perform the following instructions to install compiler:
sudo apt-get install build-essential
sudo apt-get install libxml2-dev
1.download Development package(https://www.Apachefriends.org/download.php xampp-linux-devel-1.8.1.tar.gz)
2.upload xampp-linux-devel-1.8.1.tar.gz to opt
3.download php-5.4.16 Complete Source Code(https://ar2.php.net/distributions/php-5.4.16.tar.gz)。
4.upload php-5.4.16.tar.gz to opt
5.cd into opt directory
cd /opt
6.Decompress Development package and php-5.4.16.tar.gz
tar xf xampp-linux-devel-1.8.1.tar.gz -C /opt
tar xf php-5.4.16.tar.gz -C /opt
7.cd into php-5.4.16 directory
cd php-5.4.16
8.Write configuration files
./configure --prefix=/opt/lampp/php-5.4.16 --enable-fpm --with-apxs2=/opt/lampp/bin/apxs --with-mysql=mysqlnd --with-zlib=yes --with-zlib-dir=/opt/lampp --with-mysql-sock=/opt/lampp/var/mysql/mysql.sock --enable-mbstring=all --with-curl=/opt/lampp --enable-mbregex --with-mysqli=mysqlnd --with-iconv --with-pdo-mysql=mysqlnd --with-pdo-sqlite --with-libxml-dir=/opt/lampp
9.Compile and install
make
sudo make install
10.restart xampp
/opt/lampp/lampp restart
如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。
如本文对您有用,捐赠和留言 将是对我最好的支持~(捐赠可转为站内积分)
如愿意,请向朋友推荐本站,谢谢。
尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。
留言