【问题标题】:Can't install Composer on Mac (Yosemite)无法在 Mac 上安装 Composer (Yosemite)
【发布时间】:2015-02-07 11:39:05
【问题描述】:
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'

【问题讨论】:

  • 试试 curl -s getcomposer.org/installer |须藤phpmamp
  • @TotalWipeOut sudo: phpmamp: command not found
  • 你将不得不直接调用 php 我认为然后curl -s http://getcomposer.org/installer | sudo /Applications/MAMP/bin/php/php5.6.2/bin/php
  • @TotalWipeOut 返回:Uncaught exception 'RuntimeException' with message 'Unable to write bundled cacert.pem to: /Users/myusername/.composer/cacert.pem' in -:403
  • 对不起,我打错了:/ - 已编辑我的评论。再试一次

标签: php macos composer-php


【解决方案1】:

正如上面发布的@TotalWipeOut,此命令有效:

curl -s http://getcomposer.org/installer | sudo /Applications/MAMP/bin/php/php5.6.2/bin/php

我能够使用 MAMP PHP 成功安装 composer。

【讨论】:

    猜你喜欢
    • 2019-02-19
    • 2015-12-06
    • 2015-07-17
    • 1970-01-01
    • 2014-04-25
    • 2015-12-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多