大致的过程参考了这篇文章:点击打开链接
但因为具体环境的不同,在配置的时候遇到的实际问题不太一样。
在执行./configure xxxxxxxxxxxxxxxxx的时候遇到了各种缺失的包:
1. 缺少libxml2:
checking whether to enable LIBXML support... yes
checking libxml2 install dir... yes
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
yum安装:
# yum -y install libxml2 libxml2-devel
2. 缺少:
checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
yum安装:
# yum -y install curl curl-devel
3. 缺少jpeglib:
If configure fails try --with-webp-dir=<DIR>
configure: error: jpeglib.h not found.
yum安装:
# yum -y install gd gd-devel
4. 缺少mcrypt:
checking for mcrypt support... yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
yum安装报错,原因是centos的版权问题:
# yum install libmcrypt libmcrypt-devel
可以使用第三方源:
# wget http://www.atomicorp.com/installers/atomic
# sh ./atomic
然后继续用yum安装:
# yum install php-mcrypt libmcrypt libmcrypt-devel
5. 缺少xslt:
checking for XSL support... yes
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
yum安装:
# yum install libxslt-devel
./configure xxxxxxxxxxxxx配置成功后就可以执行
# make && make install
完成安装