首先配置configure

//
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-json
//

  

需要编译安装的扩展,以--with-XXX格式添加在后面

使用如下命令将php.ini配置文件复制到默认目录,如果想用其他目录,需要在编译时configure加上--with-config-file-path=XXX

cp php.ini-development /usr/local/lib/php.ini

  

 

然后编译安装

make
sudo make install

 

 

 

configure出现以下报错解决方法:

1、configure: error: xml2-config not found. Please check your libxml2 installation.

安装libxml2和libxml2-dev

sudo apt-get install libxml2
sudo apt-get install libxml2-dev

 

 

 

 

(未完待续)

 

相关文章:

  • 2022-02-09
  • 2021-06-06
  • 2021-11-16
  • 2021-12-14
  • 2021-09-26
  • 2022-01-24
  • 2021-07-19
  • 2022-12-23
猜你喜欢
  • 2022-03-08
  • 2021-10-05
  • 2022-12-23
  • 2021-09-17
  • 2022-02-13
  • 2021-12-12
  • 2021-08-02
相关资源
相似解决方案