安装 Symfony,作曲家

Installing Symfony,Composer

只是想看看是否有人可以帮助我,我确信它非常非常基础,但我只是刚刚从 windows 转到 mac 并学习了终端基础知识

我正在尝试安装和使用 Symfony,我已经安装了自制软件,然后我输入了 composer 命令-

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

它下载并安装,但随后它说我的路径/目录无效/现在我知道我需要制作它,但我不确定它会在哪里,以及制作一个的命令是什么导向器?是 mkdir -- ?

这是终端日志-

Calvins-MacBook-Pro:~ calvin$ curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...
mv composer.phar /usr/local/bin/composer

Composer successfully installed to: /Users/calvin/composer.phar
Use it: php composer.phar
Calvins-MacBook-Pro:~ calvin$ mv composer.phar /usr/local/bin/composer
mv: rename composer.phar to /usr/local/bin/composer: No such file or directory
Calvins-MacBook-Pro:~ calvin$ 

https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx

Note: In OSX Yosemite the /usr directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory" then you must create /usr/local/bin/ manually before proceeding.

创建目录需要执行:

sudo mkdir <path>