开发者社区> 问答> 正文

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 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.

展开
收起
爱吃鱼的程序员 2020-06-09 14:47:11 805 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
    在crontab运行java的时候遇到过process不能正常退出的问题,后来在脚本里加了一个kill-9在运行java之前。参考资料: http://edu.51cto.com/course/course_id-4642.html

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

    sudocurl-sS  https://getcomposer.org/installer  |sudophp

    2020-06-09 14:47:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Alibaba Cloud Linux 3 发布 立即下载
ECS系统指南之Linux系统诊断 立即下载
ECS运维指南 之 Linux系统诊断 立即下载