gpt4 book ai didi

php - curl 无法下载 Composer 安装程序,提示 8888 端口

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:37:22 25 4
gpt4 key购买 nike

这里有全局安装 composer 的步骤:https://getcomposer.org/doc/00-intro.md#globally

命令有:

curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer

但是原来的命令: curl -sS https://getcomposer.org/installer | php返回:curl: (7) Failed connect to getcomposer.org:8888; Connection refused

如果放:80在 url 命令上:curl -sS https://getcomposer.org:80/installer | php
返回:curl: (7) Failed connect to getcomposer.org:8888; Connection refused

如果用 -P 告诉端口命令:curl -sS -P 80 https://getcomposer.org/installer | php
返回:curl: (7) Failed connect to getcomposer.org:8888; Connection refused

这里有人:Installing composer using vagrant, hhvm, and Ubuntu 14.04
告诉我试试wget,结果:

命令:wget https://getcomposer.org/installer
返回:--2014-08-29 19:13:24-- https://getcomposer.org/installer Connecting to 127.0.0.1:8888... failed: Connection refused .

命令:wget https://getcomposer.org:80/installer<br/>
returns: --2014-08-29 19:13:40-- https://getcomposer.org:80/installer Connecting to 127.0.0.1:8888... failed: Connection refused
.

我在 Linux Mint Debian Edition 上安装它,它提示端口 8888
我可以 ping getcomposer.orgtelnet getcomposer.org:80
有人能看出我做错了什么吗?
有人投票反对这个问题,但无法说出它有什么问题

最佳答案

这不是一个完美的答案,但它解决了我的问题。

只需点击网址

https://getcomposer.org/installer

它会下载一个名为“installer”的文件,现在转到下载文件夹

运行这条命令

php installer

它会给你新文件 composer.phar

这是您将从该命令中获得的确切文件

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

关于php - curl 无法下载 Composer 安装程序,提示 8888 端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25577011/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com