[英]Trying to install Composer on OSX 10.9
I'm trying to install Composer on OSX 10.9 following the instructions from getcomposer.org using this command: 我正在尝试按照getcomposer.org使用此命令的说明在OSX 10.9上安装Composer:
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
Result: 结果:
#!/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
This is a bug introduced on 3/9/14. 这是3/9/14中引入的错误。 I sent a pull request to fix it:
我发送了拉取请求来修复它:
https://github.com/composer/getcomposer.org/pull/62 https://github.com/composer/getcomposer.org/pull/62
In the mean time, just manually create a .composer folder in your home directory. 同时,只需在主目录中手动创建.composer文件夹即可。
As an alternative, try downloading an older version of the Composer installer from GitHub. 或者,尝试从GitHub下载旧版本的Composer安装程序。 Simply replace the curl endpoint to a previous state of the installer file, eg:
只需将curl端点替换为安装程序文件的先前状态,例如:
curl -sS https://raw.github.com/composer/getcomposer.org/c6fedc418e1f80347724cf1bc3e86b607ac3ba30/web/installer | php -- --install-dir=/usr/local
Note: This is an older version of the installer only, not Composer itself. 注意:这只是安装程序的旧版本,而不是Composer本身。 It'll download the latest version of Composer.
它将下载最新版本的Composer。
Additionally, to execute as superuser: 另外,以超级用户身份执行:
sudo sh -c "curl -sS https://raw.github.com/composer/getcomposer.org/c6fedc418e1f80347724cf1bc3e86b607ac3ba30/web/installer | php -- --install-dir=/usr/local"
I had the same bug. 我有同样的错误。 Finaly achieve to run it by using
sudo -s
and then re run sudo curl -sS https://getcomposer.org/installer | php
最终通过使用
sudo -s
来运行它然后重新运行sudo curl -sS https://getcomposer.org/installer | php
sudo curl -sS https://getcomposer.org/installer | php
. sudo curl -sS https://getcomposer.org/installer | php
。
Just posting this in case this could help someone. 只是发布这个以防万一这可以帮助某人。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.