美文网首页
CondaHTTPError: HTTP 000 CONNECT

CondaHTTPError: HTTP 000 CONNECT

作者: 看远方的星 | 来源:发表于2020-03-21 10:12 被阅读0次

错误:

(base) jack@omnisky:~/biosoft$ conda install samtools
Collecting package metadata (current_repodata.json): failed

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/conda-forge/linux-64/current_repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/conda-forge/linux-64'

解决方案:

原因:使用默认镜像源或配置出错,使镜像源访问速度过慢,会导致超时从而导致更新和下载失败。
修改.condarc文件: vi ~/.condarc
原来的.condarc文件:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - conda-forge  //这两个就是乱入了,可能是之前添加镜像出错的
  - bioconda
show_channel_urls: true
ssl_verify: false    //这个是当初找解决方案的尝试,不过没有效果

修改后的.condarc文件:

channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
show_channel_urls: true

如果还出现问题,试着删除一些镜像,再尝试,镜像不要加太多,容易出问题,有需要再加。


参考文章:

https://blog.csdn.net/ada0915/article/details/78529877
https://blog.csdn.net/Copper01/article/details/97134974

相关文章

网友评论

      本文标题:CondaHTTPError: HTTP 000 CONNECT

      本文链接:https://www.haomeiwen.com/subject/iwtyyhtx.html