ThinkPHP入门 Linux 下 Composer的安装出现如下错误如何解决
问题描述:学习thinphp入门问当时出现如下错误。教程中说明linux and mac 使用如下命令安装(我使用的Linux Deepin2015.1.1+php5.6):
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer输入命令:
curl -sS https://getcomposer.org/installer | php报错如下:
kuaitu@kuaitu-pc:/etc/php5/cli$ sudo curl -sS https://getcomposer.org/installer | php
All settings correct for using ComposerDownloading 1.0.3...
Could not create file /etc/php5/cli/composer.phar: fopen(/etc/php5/cli/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/etc/php5/cli/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading 1.0.3...
Could not create file /etc/php5/cli/composer.phar: fopen(/etc/php5/cli/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/etc/php5/cli/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
Downloading 1.0.3...
Could not create file /etc/php5/cli/composer.phar: fopen(/etc/php5/cli/composer.phar): failed to open stream: Permission denied
Download failed: fopen(/etc/php5/cli/composer.phar): failed to open stream: Permission denied
fwrite() expects parameter 1 to be resource, boolean given
The download failed repeatedly, aborting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用sudo 解决了此问题。有点逗比了哈!但是小白还是容易摸不着头脑,问题能帮到他人就好!
sudo curl -sS https://getcomposer.org/installer | sudo php
在crontab运行java的时候遇到过process不能正常退出的问题,后来在脚本里加了一个kill -9在运行java之前。参考资料:http://edu.51cto.com/course/course_id-4642.html