php安?時產生的問題

來源:互聯網
上載者:User
  • php在安裝時全出現很多問題,但一般安裝到最後都會有提示錯誤在哪裡.

    然後yum install -y xxx 就可以了。昨天在家裡安裝時還算順利,出現的問題都解決了。但今天在公司裡安裝時卻出現這樣問題,搞了好久,然後上網查資料,終於搞明白。問題如下:

  • 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"得到下面內容:

    #!/replace/with/path/to/perl/interpreter -w

    最後發現這裡沒有指明正確的perl執行程式的位置!

    把這一行更改為"#!/usr/bin/perl -w". 再運行php的!./configure就可以了

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.