首页 PHP小记正文

mac下composer安装

admin PHP小记 2019-04-09 196 0
cd /usr/local/bin
curl -sS -k https://getcomposer.org/installer | php

PS:如果出现

All settings correct for using Composer
The installation directory "/usr/local/bin" is not writable

处理办法:

sudo chown -R $(whoami):admin /usr/local/bin 

请输入这一条 – 然后提示计算机输入密码 -

在重新执行

curl -sS -k https://getcomposer.org/installer | php

出现如下输出 正常

All settings correct for using Composer
Downloading...
Composer (version 1.3.2) successfully installed to: /usr/local/bin/composer.phar
Use it: php composer.phar

全局

    mv composer.phar /usr/local/bin/composer 
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

评论