localhost:1nbox myusername$ sudo curl -s http://getcomposer.org/installer | phpmamp
#!/usr/bin/env php
All settings correct for using Composer
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to write bundled cacert.pem to: /Users/myusername/.composer/cacert.pem' in -:403
Stack trace:
#0 -(112): installComposer(false, false, 'composer.phar', false, false, false)
#1 -(14): process(Array)
#2 {main}
thrown in - on line 403
localhost:1nbox myusername$
我的.bash_profile
有:
alias phpmamp='/Applications/MAMP/bin/php/php5.6.2/bin/php'
正如上面@TotalWipeOut发布的,这个命令有效:
curl -s http://getcomposer.org/installer | sudo /Applications/MAMP/bin/php/php5.6.2/bin/php
我能够成功地用MAMP PHP安装作曲家。