现在说说我的解决思路:
1.根据错误内容,安装失败的原因应该是这个网址 https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2 请求失败。
2.所以我尝试用
wget https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2
1
手动下载这个包,结果出现以下错误。
-2018-12-12 18:29:18– https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2
Connecting to 127.0.0.1:33473… failed: Connection refused.
1
2
3
那么应该寻找失败的原因,127.0.0.1表示的是本机,应该不会有什么问题,那么会不会是因为端口33473被占用的原因。
3.用netstat -ntpl查看本地端口的使用情况
netstat -ntpl
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:57837 0.0.0.0:* LISTEN 2165/python
tcp 0 0 127.0.0.1:37138 0.0.0.0:* LISTEN 15851/python
tcp 0 0 127.0.0.1:45331 0.0.0.0:* LISTEN 2050/python
tcp 0 0 127.0.0.1:37492 0.0.0.0:* LISTEN 2165/python
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN –
tcp 0 0 127.0.0.1:53526 0.0.0.0:* LISTEN 15851/python
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN –
tcp 0 0 127.0.0.1:45527 0.0.0.0:* LISTEN 2165/python
tcp 0 0 127.0.0.1:45655 0.0.0.0:* LISTEN 2165/python
tcp 0 0 127.0.0.1:36887 0.0.0.0:* LISTEN 2050/python
tcp 0 0 127.0.0.1:8888 0.0.0.0:* LISTEN 30648/python
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN –
tcp 0 0 127.0.0.1:43001 0.0.0.0:* LISTEN 15851/python
tcp 0 0 127.0.0.1:59033 0.0.0.0:* LISTEN 2050/python
tcp 0 0 127.0.0.1:34684 0.0.0.0:* LISTEN 2165/python
tcp 0 0 127.0.0.1:43869 0.0.0.0:* LISTEN 2165/python
tcp 0 0 127.0.0.1:45631 0.0.0.0:* LISTEN 2050/python
tcp 0 0 127.0.0.1:58368 0.0.0.0:* LISTEN 15851/python
tcp 0 0 127.0.0.1:34498 0.0.0.0:* LISTEN 2050/python
tcp 0 0 127.0.0.1:42147 0.0.0.0:* LISTEN 15851/python
tcp 0 0 127.0.0.1:34211 0.0.0.0:* LISTEN 4448/pgAdmin4
tcp 0 0 127.0.0.1:51367 0.0.0.0:* LISTEN 2050/python
tcp 0 0 127.0.0.1:51338 0.0.0.0:* LISTEN 15851/python
tcp6 0 0 127.0.0.1:8079 :::* LISTEN 28374/java
tcp6 0 0 :::8080 :::* LISTEN 28374/java
tcp6 0 0 ::1:631 :::* LISTEN –
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
发现33473并没有被服务占用。
4.查看代理服务
export | grep -i proxy
HTTPS_PROXY=http://127.0.0.1:33473/
HTTP_PROXY=http://127.0.0.1:33473/
NO_PROXY=localhost,127.0.0.0/8,::1
http_proxy=http://127.0.0.1:33473/
https_proxy=http://127.0.0.1:33473/
no_proxy=localhost,127.0.0.0/8,::1
1
2
3
4
5
6
7
终于找到原因了,33473端口被代理服务占用了,所以接下来要做的就是关闭这些代理。
5. 使用unset关闭所有占用33474端口的代理
比如unset HTTPS_PROXY
注意,代理名称区分大小写.
——————————————————————————
接下来,install终于没问题了,
————————————————
原文链接:https://blog.csdn.net/xtfge0915/java/article/details/84977765
Recent Comments