Gra*_*avy 3 macos terminal pear
任何人都可以告诉我如何在我的MAC上安装PEAR?
尝试1:
curl http://pear.php.net/go-pear | sudo php
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 88959 100 88959 0 0 70283 0 0:00:01 0:00:01 --:--:-- 200k
Sorry! Your PHP version is too new (5.3.8) for this go-pear.
Instead use http://pear.php.net/go-pear.phar for a more stable and current
version of go-pear, more suited to your PHP version.
Thank you for your coopertion and sorry for the inconvenience!
Run Code Online (Sandbox Code Playgroud)
尝试2:
curl http://pear.php.net/go-pear.phar | sudo php
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3594k 100 3594k 0 0 1150k 0 0:00:03 0:00:03 --:--:-- 1351k
Warning: Phar::mapPhar(-): failed to open stream: No such file or directory in - on line 1119
unable to open phar for reading "-"
Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in - on line 1236
Run Code Online (Sandbox Code Playgroud)
尝试3(来自http://sudhanshuraheja.com/2011/03/installing-php-pear-on-mac-osx-10-6-with-php-5-3-3/):
curl http://pear.php.net/go-pear.phar > go-pear.phar
-bash: go-pear.phar: Permission denied
Run Code Online (Sandbox Code Playgroud)
我正在尝试安装phpUnit,但如果没有梨,我不能这样做.
最后一个是在正确的轨道上:你不能使用curl|php更新版本的方法(这就是文档不再建议的原因).
来自bash的错误消息应该告诉你到底出了什么问题.您正在尝试保存名为的文件go-pear.phar,但您无权这样做.很可能这是因为你已经cd进入了一个你没有写权限的目录,比如/.
一种解决方案是这样做:
http://pear.php.net/go-pear.phar > ~/go-pear.phar
sudo php ~/go-pear.phar
Run Code Online (Sandbox Code Playgroud)
更简单的是,如果你打开一个新的终端,你最终会进入〜,你可以按原样按照说明进行操作.
| 归档时间: |
|
| 查看次数: |
3136 次 |
| 最近记录: |