因此,看起來/ usr(其他目錄)的新「系統完整性保護」lockdown使pear和pecl成爲非啓動程序。有沒有人發現一個解決方法不能禁用它?在OS X 10.11上安裝pecl和pear El Capitan,macOS 10.12 Sierra,macOS 10.13高級Sierra
36
A
回答
59
0
下面是Macworld文章的鏈接,介紹如何啓用和禁用「系統完整性保護」。
21
從這個鏈接:http://jason.pureconcepts.net/2012/10/install-pear-pecl-mac-os-x/有了這個說明,您不需要禁用「系統完整性保護」
The following instructions install PEAR and PECL on Mac OS X under /usr/local/. PECL is bundled with PEAR. So this is as simple as installing PEAR on Mac OS X.
PEAR is PHP’s Package Repository and makes it easy to download and install PHP tools like PHPUnit and XDebug. I specifically recommend these two for every PHP developer.
Download PEAR
curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar
Configure and Install PEAR
You should now be at a prompt to configure PEAR.
Type 1 and press return.
Enter: /usr/local/pear
Type 4 and press return.
Enter: /usr/local/bin
Press return
Verify PEAR. You should be able to type:
pear version
Eventually, if you use any extensions or applications from PEAR, you may need to update PHP’s include path.
+2
謝謝謝謝謝謝 – kevando
28
你不應該二進制文件安裝到系統/usr
,使用改爲。
可以使用自制軟件安裝pear
:
brew install php56 --with-pear
注:如果上面的命令將無法正常工作,請確保您先添加水龍頭:brew tap homebrew/homebrew-php
。
注意:如果您已經有php56
包,也可以輸入reinstall
。
,或者直接下載的Phar包:
curl -o /usr/local/bin/pear http://pear.php.net/go-pear.phar
chmod +x /usr/local/bin/pear
那麼你應該有pecl
和pear
二進制文件與你php
如果不是一起,通過重新鏈接它:
brew unlink php56 && brew link php56 --dry-run && brew link php56
而且pecl
你應該把它與php
一起母雞通過brew install php56
安裝。如果not,試圖將其手動鏈接:
ln -vs "$(find /usr/local/Cellar/php56 -name pecl -print -quit)" /usr/local/bin
0
這個工作對我來說MacOS的塞拉利昂10.12.1的升級PHP,PEAR安裝和V8
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
phpversion="$(php -v | tail -r | tail -n 1 | cut -d " " -f 2 | cut -c 1,3)"
brew unlink php$phpversion
brew install php71
brew install autoconf
curl -O http://pear.php.net/go-pear.phar
php -d detect_unicode=0 go-pear.phar
echo -e "\nexport PATH=$HOME/pear/bin:$PATH \n"
source ~/.bash_profile
echo -e "\ninclude_path = '.:/Users/YOURUSERNAME/pear/share/pear/' \nextension=v8js.so \n" >> /usr/local/etc/php/7.1/php.ini
git clone https://github.com/phpv8/v8js ~/tmp/v8js && cd $_
./configure CXXFLAGS="-Wno-c++11-narrowing"
make
make test
make install
sudo apachectl restart
相關問題
- 1. macOS上的PDFtk服務器高Sierra 10.13
- 2. Intel HAXM on macOS high sierra(10.13)
- 3. 在macOS Sierra 10.12上運行Xcode 6.x
- 4. 錯誤:在Macos上安裝RabbitMQ sierra
- 5. 如何在macOS(Capitan/Sierra)中安裝wget?
- 6. 錯誤在MacOS上安裝virtualenvwrapper高Sierra 10.13
- 7. 在macOS上安裝pip Sierra
- 8. MacOS Sierra上的石墨安裝Sierra 10.12.4
- 9. 與macOs安裝pyaudio Sierra
- 10. macOS捆綁錯誤10.12 Sierra
- 11. macOS上的PHP7 Sierra Beta無法安裝
- 12. 如何在macOS Sierra 10.12上更新java
- 13. Jenkins在macOS上不啓動10.12(Sierra)
- 14. 在MacOs上安裝PhantomJS 10.11 El Captian
- 15. macOS Sierra安裝PyQt5 for python2.7
- 16. 在OS X上安裝GoogleTest問題(Sierra)
- 17. MacOS下的mono macpack 10.11 El Capitan
- 18. 無法在macOS上安裝wxPython Sierra
- 19. 在macOS上使用Nix安裝Scala Sierra
- 20. 在macOS sierra上安裝appium 10.12.3
- 21. 如何在MacOS上安裝pymssql Sierra
- 22. 無法在MacOS上安裝「mysql gem」Sierra
- 23. 在macOS Sierra上安裝Nokogiri時出錯
- 24. Intel HAXM安裝在macOS Sierra上掛起
- 25. 無法在macOS上安裝mysql2 gem Sierra
- 26. 在macOS上正確安裝OpenCV Sierra
- 27. 在MacOS Sierra上安裝/卸載Apache2 Sierra 10.12.1
- 28. Virtualenv掛在macOS Sierra
- 29. macOS Sierra中的NEProviderTargetTemplates Sierra
- 30. 無法在macOS中安裝openCV Sierra
最後,我禁用它,做我需要做什麼,然後重新啓用它。 – axlotl
你如何禁用並重新啓用它? – Aegis