mac下通過brew 安裝的php,可能使用了 --debug 標識,php命令列時,一直出現 "Unable to initialize module"

來源:互聯網
上載者:User

mac通過brew安裝php,以及php模組,一致出現一個 "Unable to initialize module"。也一直不知道什麼原因,一直放著。今天,看laravel的映像依賴包“intervention”,想使用 "imagick" 映像庫,發現就是這個問題導致載入不了imagick,只有google了。發現下面這個地址,以前沒注意:

https://github.com/Homebrew/homebrew-php/issues/1743

解釋了:

If you compile PHP with debug, you'll have to install extensions from source as well.

一旦我們安裝php時,使用了 "--debug",就應該從原始碼來安裝擴充,而不是從"bintray binary" 來安裝。

brew 預設是從 "bintray binary" 來安裝的,我們在安裝時,可傳入 "-fs" 參數,來從原始碼來安裝

brew remove php71-imagick

brew install php71-imagick -fs


總結:

有時間,可以看看上面的地址,應該就是brew來支援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.