我有PHP5通過macports安裝在/opt/local/... macports的默認位置。沒有梨的portfile。如果我從梨網站執行標準梨安裝,應該將哪些目錄位置放入梨中以與PHP一起工作?macports的梨安裝PHP5
回答
雖然curl選項有效,但在更新端口時它不會更新。一種替代方案:
sudo port install php5 +pear
這將安裝PHP5的變種梨,在相同的位置上面下載,併爲您更新的MacPorts它會更新。
我剛纔有一個類似的問題,並且正好在您提到的目錄中安裝PEAR。
curl -O http://pear.php.net/go-pear.phar
sudo php go-pear.phar
我將安裝基目錄($ prefix)更改爲指向/ opt/local並運行安裝程序。它修改了我的php.ini文件以包含PEAR路徑。
我的bash路徑已經包含/ opt/local/bin,所以PEAR剛剛工作!
涼爽。真高興你做到了! – demet8 2011-05-05 15:21:23
對於那些在MacPorts之外運行PHP @ Ben的回答,進行以下修改,實際上是解決問題的方法。我需要PEAR來安裝PHPUnit,所以我可以做一些單元測試,但是我使用XAMPP。
我跟着本的解決方案,但試圖安裝它時出現錯誤。我的錯誤是:
WARNING! The include_path defined in the currently used php.ini does
not contain the PEAR PHP directory you just specified:
</opt/local/share/pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.
Current include path : .:
Configured directory : /opt/local/share/pear
Currently used php.ini (guess) :
我設置目前使用的php.ini文件的路徑以下和所有的工作完美:
/Applications/XAMPP/xamppfiles/etc/php.ini
希望,在最壞的情況,這有助於其他XAMPP用戶!
我不知道爲什麼沒有人寫了一個更新的解決方案,所以我這樣做:
sudo port install pear-PEAR
sudo port install php53-pear
替換53
與要使用任何PHP的版本。然後用MacPorts安裝您需要的pear-package!你可以得到可用的軟件包的完整列表,與
port echo name:^pear-
如在其他答案的評論中提到,去這裏更多的信息: https://superuser.com/q/650299/39309
- 1. 通過macports安裝梨
- 2. curl_init在Macports php5安裝後丟失
- 3. PEAR /梨安裝
- 4. Macports安裝binutils
- 5. PHP5 XSL安裝
- 6. Macports安裝需要
- 7. macports安裝日誌?
- 8. 用MacPorts安裝PyOpenGL
- 9. 更新php5安裝
- 10. Yocto PHP5 image安裝
- 11. 無法安裝梨安裝PHPUnit/PHPUnit_Selenium
- 12. 安裝使用MacPorts的
- 13. Macports的問題Ruby19安裝
- 14. MacPorts的安裝錯誤
- 15. Python庫安裝MacPorts的
- 16. 更改macports安裝的makefile
- 17. 更改macports安裝目錄*安裝後
- 18. 有安裝predis梨包OSX
- 19. 重新安裝PHP梨
- 20. 無法安裝梨依賴
- 21. 安裝梨路徑定義
- 22. 梨安裝PHPUnit_Selenium到Windows
- 23. MDB2梨形窗口安裝
- 24. 使用梨安裝vfsstream
- 25. 從ant build安裝梨子
- 26. 安裝PHP5-geoip的失敗
- 27. 使用MacPorts安裝Eclipse
- 28. 安裝Play 2.0通過macports
- 29. 從Macports安裝cURL失敗
- 30. 不能退出macports安裝
不要忘了使用pear config-set來將您的配置變量更改爲macports/opt/local目錄! – CamelBlues 2011-07-20 19:45:35