找不到 apxs 路徑
在重新編譯 PHP 時出現找不到 apxs 路徑的錯誤訊息:
./configure: /usr/sbin/apxs: No such file or directory
解決方式如下:
1.安裝Apache的擴展套件apxs,這是httpd-devel之中的一個套件,可以用yum將其安裝:
# yum -y install httpd-devel
2.利用指令確認安裝位址:
# which apxs
/use/sbin/apxs
找不到 xml2-config
在編譯 PHP 的時候出現找不到 xml2-config 的錯誤訊息:
configure: error: xml2-config not found. Please check your libxml2 installation.
解決方式:
使用 yum 安裝 libxml2 及 libxml2-devel 套件:
# yum -y install libxml2 libxml2-devel
OpenSSL 錯誤
錯誤訊息:
Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s
重新安裝 openssl 及 openssl-devel:
# yum install openssl openssl-devel
Bzip2 錯誤
錯誤訊息:
Configure: error: Please reinstall the BZip2 distribution
如果出現 Bzip2 的錯誤,可以重新安裝 bzip2。
因為 yum 找不到 bzip2 套件,可直接去官網下載:
http://www.bzip.org/
下載完後執行安裝:
# tar zxvf bzip2-1.0.5.tar.gz
# cd bzip2-1.0.5
# make install
# yum -y install openssl-devel
gmp 錯誤
錯誤訊息:
configure: error: Unable to locate gmp.h
重新安裝 gmp-devel:
# yum -y install gmp-devel
curl 錯誤
錯誤訊息:
Configure: error: Please reinstall the libcurl distribution -
easy.h should be in
重新安裝 curl-devel:
# yum install curl curl-devel
libjpeg 錯誤
錯誤訊息:
Configure: error: libjpeg.(also) not found.
重新安裝 libjpeg-devel 及 libjpeg:
# yum install libjpeg libjpeg-devel
libpng 錯誤
錯誤訊息:
Configure: error: libpng.(also) not found.
重新安裝 libpng-devel 及 libpng:
# yum install libpng libpng-devel
freetype 錯誤
錯誤訊息:
Configure: error: freetype.h not found.
重新安裝 freetype-devel:
# yum install freetype-devel
libmcrypt 錯誤
錯誤訊息:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
重新安裝 libmcrypt 及 libmcrypt-devel:
# yum install libmcrypt libmcrypt-devel
MySQL 錯誤
錯誤訊息:
Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
重新安裝 mysql-devel:
# yum install mysql-devel
ncurses 錯誤
錯誤訊息:
Configure: error: Please reinstall the ncurses distribution
重新安裝 ncurses 及 ncurses-devel:
# yum install ncurses ncurses-devel
unixODBC 錯誤
錯誤訊息:
Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!
重新安裝 unixODBC-devel:
# yum install unixODBC-devel
pspell 錯誤
錯誤訊息:
Configure: error: Cannot find pspell
重新安裝 pspell-devel:
# yum install pspell-devel
mcrypt 錯誤
錯誤訊息:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
重新安裝 libmcrypt 及 libmcrypt-devel:
# yum install libmcrypt libmcrypt-devel
snmp 錯誤
錯誤訊息:
Configure: error: snmp.h not found. Check your SNMP installation.
重新安裝 net-snmp 及 net-snmp-devel:
# yum install net-snmp net-snmp-devel
1 意見:
不懂為何會不見~前幾天也遇到過~
張貼留言