其他分享
首页 > 其他分享> > 试图在OSX 10.9上安装Composer

试图在OSX 10.9上安装Composer

作者:互联网

我正在尝试使用以下命令按照getcomposer.org的说明在OSX 10.9上安装Composer:

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local

结果:

#!/usr/bin/env php
All settings correct for using Composer

Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to write bundled     cacert.pem to: /Users/aaron.rossano/.composer/cacert.pem' in -:402
Stack trace:
#0 -(112): installComposer(false, '/usr/local', 'composer.phar', false, false, false)
#1 -(14): process(Array)
#2 {main}
thrown in - on line 402

解决方法:

或者,尝试从GitHub下载较旧版本的Composer安装程序.只需将curl端点替换为安装程序文件的先前状态即可,例如:

curl -sS https://raw.github.com/composer/getcomposer.org/c6fedc418e1f80347724cf1bc3e86b607ac3ba30/web/installer | php -- --install-dir=/usr/local

注意:这仅是安装程序的旧版本,而不是Composer本身.它将下载最新版本的Composer.

此外,以超级用户身份执行:

sudo sh -c "curl -sS https://raw.github.com/composer/getcomposer.org/c6fedc418e1f80347724cf1bc3e86b607ac3ba30/web/installer | php -- --install-dir=/usr/local"

标签:composer-php,osx-mavericks,php,macos
来源: https://codeday.me/bug/20191122/2056268.html