ThinkPHP入门 Linux 下 Composer的安装出现如下错误如何解决

viowin 发布于 2016/05/06 17:00
阅读 960
收藏 0

问题描述:学习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 Composer
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
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.

加载中
0
让往事随风
让往事随风
在crontab运行java的时候遇到过process不能正常退出的问题,后来在脚本里加了一个kill -9在运行java之前。参考资料:http://edu.51cto.com/course/course_id-4642.html
0
viowin
viowin

我使用sudo 解决了此问题。有点逗比了哈!但是小白还是容易摸不着头脑,问题能帮到他人就好!

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

返回顶部
顶部