安装后的Composer错误

时间:2016-09-27 13:40:44

标签: terminal composer-php

sS https://getcomposer.org/installer | php 从终端。我得到了这个输出:

Composer successfully installed to: /Users/kevin/composer.phar
Use it: php composer.phar
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

The OpenSSL library (0.9.8zc) used by PHP does not support TLSv1.2 or TLSv1.1.
If possible you should upgrade OpenSSL to version 1.0.1 or above.

然后我尝试了运行:composer -h

它没有用,它说命令没找到。关于如何解决这个问题的任何想法?

不胜感激。

提前致谢,

凯文

1 个答案:

答案 0 :(得分:0)

正如脚本所说,composer安装到/Users/kevin/composer.phar,这意味着只有当你在这个目录中时它才可用。为了使它在任何地方都可用,文件必须放在/usr/local/bin文件夹中。

以下命令将直接安装在那里:

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer