在我們源碼編譯安裝PHP的時候,總會遇到各種各樣的問題,每次編譯的時候都會提示我們?nèi)グ惭b其他
公司主營業(yè)務:成都網(wǎng)站制作、網(wǎng)站建設、移動網(wǎng)站開發(fā)等業(yè)務。幫助企業(yè)客戶真正實現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競爭能力。成都創(chuàng)新互聯(lián)公司是一支青春激揚、勤奮敬業(yè)、活力青春激揚、勤奮敬業(yè)、活力澎湃、和諧高效的團隊。公司秉承以“開放、自由、嚴謹、自律”為核心的企業(yè)文化,感謝他們對我們的高要求,感謝他們從不同領域給我們帶來的挑戰(zhàn),讓我們激情的團隊有機會用頭腦與智慧不斷的給客戶帶來驚喜。成都創(chuàng)新互聯(lián)公司推出新華免費做網(wǎng)站回饋大家。
要依賴的包,筆者根據(jù)自己多次安裝的經(jīng)驗以及網(wǎng)絡上找到的不少資料,將出錯提示與解決方法做了一
個小小的匯總。
首先,我們在編譯的時候需要安裝很多的包,而這些包不一定在我們本來的yum源中有,所以我們可以
先去安裝一個yum的擴展源。
yum install -y release
yum install -y freetype-devel libevent libevent-devel libxml2 libxml2-devel ncurses ncurses-devel openssl openssl-devel libjpeg libjpeg-devel libpng libpng–devel zlib-devel bzip2 bzip2-devel libmcrypt libmcrypt-devel
然后我們再來看看可能會遇到的各種錯誤以及解決方法:
錯誤:configure: error: freetype-config not found.
解決:yum install freetype-devel
錯誤:configure: error: libevent >= 1.4.11 could not be found
解決:yum -y install libevent libevent-devel
錯誤:configure: error: Please reinstall the MySQL distributio
解決:yum -y install mysql-devel
錯誤:make: *** [sapi/fpm/php-fpm] error 1
解決:用make ZEND_EXTRA_LIBS='-liconv'編譯
錯誤:configure: error: XML configuration could not be found
解決:yum -y install libxml2 libxml2-devel
錯誤:configure: error: No curses/termcap library found
解決:yum -y install ncurses ncurses-devel
錯誤:configure: error: xml2-config not found
解決:yum -y install libxml2 libxml2-devel
錯誤:configure: error: Cannot find OpenSSL's
解決:yum install openssl openssl-devel
錯誤:configure: error: Please reinstall the libcurl distribution -easy.h should be in
解決:yum install curl curl-devel
錯誤:configure: error: Cannot find ldap.h
解決:yum install openldap openldap-devel
錯誤:configure: error: libjpeg.(aso) not found
解決:yum install libjpeglibjpeg -devel
錯誤:configure: error: libpng.(aso) not found.
解決:yum install libpnglibpng –devel
錯誤:onfigure: error: freetype.h not found.
解決:yum install freetype-devel
錯誤:configure: error: cannot find output from lex; giving up
解決:yum -y install flex
錯誤:configure: error: mod_deflate has been requested but can not be built due to prerequisite failures
解決:yum -y install zlib-devel openssl-devel
錯誤:Configure: error: Unable to locate gmp.h
解決:yum install gmp-devel
錯誤:Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
解決:yum install mysql-devel
更多的補充內(nèi)容:
安裝php: ./configure
configure: error: XML configuration could not be found
yum -y install libxml2 libxml2-devel
Cannot find OpenSSL's
yum install openssl openssl-devel
1) Configure: error: xml2-config not found. Please check your libxml2 installation.
#yum install libxml2 libxml2-devel (For RedHat & Fedora)
# aptitude install libxml2-dev (For Ubuntu)
2) Checking for pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's
#yum install openssl openssl-devel
3) Configure: error: Please reinstall the BZip2 distribution
# yum install bzip2 bzip2-devel
4) Configure: error: Please reinstall the libcurl distribution -
easy.h should be in
# yum install curl curl-devel
5) Configure: error: libjpeg.(also) not found.
# yum install libjpeg libjpeg-devel
6) Configure: error: libpng.(also) not found.
# yum install libpng libpng-devel
7) Configure: error: freetype.h not found.
#yum install freetype-devel
8) Configure: error: Unable to locate gmp.h
# yum install gmp-devel
9) Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
# yum install mysql-devel
10) Configure: error: Please reinstall the ncurses distribution
# yum install ncurses ncurses-devel
11) Checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h' not found!
# yum install unixODBC-devel
12) Configure: error: Cannot find pspell
# yum install pspell-devel
13) configure: error: mcrypt.h not found. Please reinstall libmcrypt.
# yum install libmcrypt libmcrypt-devel
14) Configure: error: snmp.h not found. Check your SNMP installation.
# yum install net-snmp net-snmp-devel