(轉)ubuntu源碼編譯安裝php常見錯誤解決辦法

來源:互聯網
上載者:User

標籤:correct   enable   bre   wrapper   mysqli   ssl   sudo   blank   ml2   

原文地址 

http://blog.csdn.net/white__cat/article/details/28907535

 

 

‘./configure’ ‘–prefix=/usr/local/PHP’ ‘–with-config-file-path=/etc’ ‘–with-MySQL=/usr/local/mysql’ ‘–with-mysqli=/usr/local/mysql/bin/mysql_config’ ‘–with-iconv-dir=/usr/local’ ‘–with-freetype-dir’ ‘–with-jpeg-dir’ ‘–with-png-dir’ ‘–with-zlib’ ‘–with-libxml-dir=/usr’ ‘–enable-xml’ ‘–disable-rpath’ ‘–enable-safe-mode’ ‘–enable-bcmath’ ‘–enable-shmop’ ‘–enable-sysvsem’ ‘–enable-inline-optimization’ ‘–with-curl’ ‘–with-curlwrappers’ ‘–enable-mbregex’ ‘–enable-fpm’ ‘–enable-mbstring’ ‘–with-mcrypt’ ‘–with-gd’ ‘–enable-gd-native-ttf’ ‘–with-openssl’ ‘–with-mhash’ ‘–enable-pcntl’ ‘–enable-sockets’ ‘–with-xmlrpc’ ‘–enable-zip’ ‘–enable-soap’
出現得錯誤如下:
錯誤一:
configure: error: xml2-config not found. Please check your libxml2 installation.
而我已經安裝過了libxml2,但是還是有這個提示:
解決辦法:
# sudo apt-get install libxml2-dev

錯誤二:
configure: error: Please reinstall the BZip2 distribution
而我也已經安裝了bzip2,網上找到得解決方案都是需要安裝bzip2-dev,可是11.10裡面沒有這個庫。
解決辦法:在網上找到bzip2-1.0.5.tar.gz,解壓,直接make ,sudo make install.(我使用的該源來自於http://ishare.iask.sina.com.cn/f/9769001.html)

錯誤三:
configure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/
解決辦法:
# sudo apt-get install libcurl4-gnutls-dev

錯誤四:
configure: error: jpeglib.h not found.
解決辦法:
# sudo apt-get install libjpeg-dev

錯誤五:
configure: error: png.h not found.
解決辦法:
# sudo apt-get install libpng-dev

錯誤六:
configure: error: libXpm.(a|so) not found.
解決辦法:
# sudo apt-get install libxpm-dev

錯誤七:
configure: error: freetype.h not found.
解決辦法:
# sudo apt-get install libfreetype6-dev

錯誤八:
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.
解決辦法:
# sudo apt-get install libt1-dev

錯誤九:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解決辦法:
# sudo apt-get install libmcrypt-dev

錯誤十:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
解決辦法:
# sudo apt-get install libmysql++-dev

錯誤十一:
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解決辦法:
# sudo apt-get install libxslt1-dev
可見php源碼安裝之前需要先安裝這些依賴,詳細可見http://forum.ubuntu.org.cn/viewtopic.php?f=88&t=231159
如上錯誤都解決之後,再次./config….沒有錯誤之後,
# make
# sudo make install

(轉)ubuntu源碼編譯安裝php常見錯誤解決辦法

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.