十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
php在安裝時全出現(xiàn)很多問題,但一般安裝到最后都會有提示錯誤在哪里.
然后yum install -y xxx 就可以了。昨天在家里安裝時還算順利,出現(xiàn)的問題都解決了。但今天在公司里安裝時卻出現(xiàn)這樣問題,搞了好久,然后上網(wǎng)查資料,終于搞明白。問題如下:
sorry, I cannot run apxs. Possible reasons 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 is displayed)
configure: error: Sorry,I cannot run apxs. Either you need to install Perl or you need to pass the absolute path of apxs by using --with-apxs=/absolute/path/to/apxs
首先,通過錯誤提示,我們得知"I cannot rum apxs". 我一直以為是apxs安裝有問題,但找了很久仍未得到合理的解釋和解決方法.
于是我直接運行"/usr/local/apache/bin/apxs"這個腳本,得到下面的錯誤提示:
bash: ./apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory
運行"vi /usr/local/apache/bin/apxs"得到下面內(nèi)容:
#!/replace/with/path/to/perl/interpreter -w
最后發(fā)現(xiàn)這里沒有指明正確的perl執(zhí)行程序的位置!
把這一行更改為"#!/usr/bin/perl -w". 再運行php的!./configure就可以了
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機、免備案服務(wù)器”等云主機租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。