首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >下载https://repo.packagist.org/p2/stevebauman/location.json:时curl错误5无法解析代理: my.proxyserver.net

下载https://repo.packagist.org/p2/stevebauman/location.json:时curl错误5无法解析代理: my.proxyserver.net
EN

Stack Overflow用户
提问于 2022-11-07 08:12:08
回答 1查看 22关注 0票数 0

在laravel项目中运行composer require stevebauman/location时,我使用ubuntu20.04,得到以下错误

代码语言:javascript
运行
复制
You are running Composer with SSL/TLS protection disabled.
https://repo.packagist.org could not be fully loaded (curl error 5 while downloading https://repo.packagist.org/packages.json: Could not resolve proxy: my.proxyserver.net), package information was loaded from the local cache and may be out of date

In CurlDownloader.php line 377:
                                                                                                                                       
  curl error 5 while downloading https://repo.packagist.org/p2/stevebauman/location.json: Could not resolve proxy: my.proxyserver.net  
                                                                                                                                       

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

我在我的手机上连接到互联网,然后再运行这个命令,我得到流动的错误。

代码语言:javascript
运行
复制
You are running Composer with SSL/TLS protection disabled.
https://repo.packagist.org could not be fully loaded (curl error 7 while downloading https://repo.packagist.org/packages.json: Failed to connect to my.proxyserver.net port 8080: Connection refused), package information was loaded from the local cache and may be out of date

In CurlDownloader.php line 377:
                                                                                                                                                                     
  curl error 7 while downloading https://repo.packagist.org/p2/stevebauman/location~dev.json: Failed to connect to my.proxyserver.net port 8080: Connection refused  
                                                                                                                                                                     

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]

我如何纠正这个错误??请救救我!

EN

Stack Overflow用户

发布于 2022-11-08 20:49:29

似乎composer想要使用代理服务器来连接网络上不可用的连接。在为composer设置代理服务器时查看this question,查看变量http_proxy的系统环境变量,并在需要时注意它用于还原的值。

然后清除变量:

代码语言:javascript
运行
复制
$ unset http_proxy

恢复:

代码语言:javascript
运行
复制
$ export http_proxy=<YOUR_ORIGINAL_VALUE>
票数 0
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74343622

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档