首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >配置Linux不支持的代理

配置Linux不支持的代理
EN

Stack Overflow用户
提问于 2018-05-08 14:36:19
回答 4查看 25.5K关注 0票数 10

我是linux的新手,我刚刚开始使用debian。我试着安装g++

代码语言:javascript
复制
apt-get install g++

但这不起作用

代码语言:javascript
复制
root@HP:/home/krzysztof# apt-get install g++
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  g++-6 libstdc++-6-dev
Suggested packages:
  g++-multilib g++-6-multilib gcc-6-doc libstdc++6-6-dbg libstdc++-6-doc
The following NEW packages will be installed:
  g++ g++-6 libstdc++-6-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,516 kB of archives.
After this operation, 39.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://ftp.pl.debian.org/debian stretch/main amd64 libstdc++-6-dev             amd64 6.3.0-18+deb9u1
  Unsupported proxy configured: 127.0.0.1://8888
Ign:2 http://ftp.pl.debian.org/debian stretch/main amd64 g++-6 amd64     6.3.0-18+deb9u1
Err:3 http://ftp.pl.debian.org/debian stretch/main amd64 g++ amd64 4:6.3.0-4
  Unsupported proxy configured: 127.0.0.1://8888
Err:1 http://security.debian.org/debian-security stretch/updates/main     amd64 libstdc++-6-dev amd64 6.3.0-18+deb9u1
  Unsupported proxy configured: 127.0.0.1://8888
Err:2 http://security.debian.org/debian-security stretch/updates/main     amd64 g++-6 amd64 6.3.0-18+deb9u1
  Unsupported proxy configured: 127.0.0.1://8888
E: Failed to fetch http://security.debian.org/debian-    security/pool/updates/main/g/gcc-6/libstdc++-6-dev_6.3.0-18+deb9u1_amd64.deb          Unsupported proxy configured: 127.0.0.1://8888
E: Failed to fetch http://security.debian.org/debian-    security/pool/updates/main/g/gcc-6/g++-6_6.3.0-18+deb9u1_amd64.deb      Unsupported proxy configured: 127.0.0.1://8888
E: Failed to fetch http://ftp.pl.debian.org/debian/pool/main/g/gcc-    defaults/g++_6.3.0-4_amd64.deb  Unsupported proxy configured:     127.0.0.1://8888
E: Unable to fetch some archives, maybe run apt-get update or try with --    fix-missing?
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2018-05-08 16:06:48

错误消息说:

不支持的代理配置: 127.0.0.1://8888

因此,似乎您(或其他人)配置了一个伪代理服务器,它很可能应该读取127.0.0.1:8888 (没有斜杠(//) )。

您需要在apt.conf(5) (/etc/apt/apt.conf/etc/apt/apt.conf.d/)中或通过http_proxy环境变量更改这些值。

票数 -4
EN

Stack Overflow用户

发布于 2018-08-14 21:54:06

"//“是一条线索,说明您已经将"http://”“从代理配置的开头去掉了

例如:

代码语言:javascript
复制
Acquire::http::Proxy "127.0.0.1:8888/"

将给出错误Unsupported proxy configured: 127.0.0.1://8888,而

代码语言:javascript
复制
Acquire::http::Proxy "http://127.0.0.1:8888/"

将正确设置代理。

票数 46
EN

Stack Overflow用户

发布于 2020-03-25 09:27:01

创建文件/etc/apt/apt.conf并添加以下内容:

代码语言:javascript
复制
 "http://<IP>:<PORT>/";
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50236188

复制
相关文章

相似问题

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