Linux PHP安裝遇見的問題及解決方案

來源:互聯網
上載者:User

標籤:linux php安裝出現錯誤   解決方案   

遇到的問題與解決方案 
問題一:

報以下錯誤
./configure以下錯誤發生
Sorry, I cannot run apxs.  Possiblereasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using--with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page isdisplayed)
 
解決方案:指定正確的apxs路徑
1.尋找apxs路徑
# whereis apxs
apxs:
說明系統沒有安裝apxs擴充工具
2.安裝apxs
# yum install httpd-devel
3.尋找apxs路徑
# whereis apxs
apxs: /usr/sbin/apxs /usr/share/man/man8/apxs.8.gz
apxs安裝成功
問題二:

報以下錯誤
安裝apxs以下錯誤發生:
Package cyrus-sasl-plain needs cyrus-sasl-lib = 2.1.22-4, thisis not available. 
解決方案:
# yum -y install cyrus* 
之後再次安裝apxs 
問題三:

報以下錯
再次./configure以下錯誤發生
configure: error: xml2-config not found. Please check your libxml2installation.
解決方案:
安裝libxml2
# yum install libxml2-devel 
【問題四:=====================================================】
hecking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed.  Pleasecheck the config.log fordetails.
解決方案:
# yum erase zlib-devel
# yum install zlib-devel
# yum install libxml2-devel

[[email protected] ~]#  ./configure --prefix=/usr/local/php--with-apxs2=/usr/local/apache2/bin/apxs

# make && make install

【問題5。。。。。。。。。。。。。。。。。。。。。】

configure: error: mcrypt.h not found.Please reinstall libmcrypt.

解決方案:

解決辦法一
1、安裝第三方yum源
wgethttp://www.atomicorp.com/installers/atomic
sh ./atomic
2、使用yum命令安裝
yum  install  php-mcrypt libmcrypt  libmcrypt-devel 

 


本文出自 “白手起家” 部落格,請務必保留此出處http://baishouqijia.blog.51cto.com/2580498/1927062

Linux 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.