bash 安装 Composer 时出错 - curl: (23) 写入正文失败 (0 != 16133)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36879168/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error installing composer - curl: (23) Failed writing body (0 != 16133)
提问by vick
I am trying to install symfony in debian 8 jessie but I have a problem when I execute this instruction in the terminal:
我正在尝试在 debian 8 jessie 中安装 symfony,但是当我在终端中执行此指令时遇到问题:
curl -sS https://getcomposer.org/installer | php
this is the error message:
这是错误消息:
bash: php: no se encontró la orden
curl: (23) Failed writing body (0 != 16133)
bash: php: no se encontró la orden
curl: (23) 写入正文失败 (0 != 16133)
Can somebody help me?
有人可以帮助我吗?
Thank you. And sorry for my English
谢谢你。对不起我的英语
回答by Tretyakov Pavel
回答by cikewang
curl -sS https://getcomposer.org/installer | /usr/local/php/bin/php
Try to PHP fully specified path
尝试PHP完全指定路径
回答by Santos L. Victor
First of all make sure that your php.ini is with openssl active, in my case I'm using Xamp, the configuration file is in the directory:
首先确保您的 php.ini 与 openssl 处于活动状态,在我的情况下我使用的是 Xamp,配置文件在目录中:
C: \ xampp \ php \ php.ini
C:\xampp\php\php.ini
On line 892, change from:
在第 892 行,从:
;Extension = php_openssl.dll
To
到
Extension = php_openssl.dll
Then, you must restart your Apache server in my case by Xampp just click according to the image below:
然后,在我的情况下,您必须通过 Xampp 重新启动 Apache 服务器,只需根据下图单击即可:
After that, go to the command prompt (CMD) and enter the following command:
之后,转到命令提示符(CMD)并输入以下命令:
curl -s https://getcomposer.org/installer | Php --disable-tls
curl -s https://getcomposer.org/installer | Php --disable-tls
回答by rbncha
Try this way:
试试这个方法:
curl -LsS http://symfony.com/installer > symfony.phar
sudo mv symfony.phar /usr/local/bin/symfony
sudo chmod a+x /usr/local/bin/symfony
it worked for me!
它对我有用!
回答by Willian Will
Download Composer installer file from getcomposer.comin your browser, open terminal, type
在浏览器中从getcomposer.com下载 Composer 安装程序文件,打开终端,输入
mv installation /usr/src
do that
去做
sudo php installer --install-dir=/usr/local/bin --filename=composer,