1.打开网址https://getcomposer.org
2.终端依次输入https://getcomposer.org/download/页面中Run this in your terminal to get the latest Composer version:中的命令
如图:

3.执行完这一系列命令之后composer.phar就应该出现在这个目录

4.此时使用在终端输入 php composer.phar就应该有反应了,但此时输入composer是不行的
执行mv composer.phar/usr/local/bin/composer,就可以在终端输入命令composer使用composer了
网友评论