使用conda 安装MEGAHIT 软件时,出现 Solving environment: failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/linux-64/repodata.json.bz2>:
的错误:
直接安装
$ ./conda install -c bioconda megahit
Solving environment: failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/r/linux-64/repodata.json.bz2>
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.
.....
报错,显示没有源。
配置最新的清华源。这注意必须是最新的,有些旧的不能使用,可以点击链接去看看最新的源是什么?
# vi ~/.condarc
把下列内容拷进去,保存.condarc文件
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
再次运行
# ./conda install -c bioconda megahit
Solving environment: done
## Package Plan ##
environment location: /home/SLX/miniconda3
added / updated specs:
- megahit
The following packages will be downloaded:
package | build
---------------------------|-----------------
openjdk-8.0.152 | h7b6447c_3 128.5 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
_libgcc_mutex-0.1 | main 3 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
libgcc-ng-9.1.0 | hdf63c60_0 8.1 MB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
ca-certificates-2021.1.19 | h06a4308_1 125 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
wheel-0.36.2 | pyhd3eb1b0_0 31 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
certifi-2020.12.5 | py36h06a4308_0 144 KB https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
tk-8.6.10 | hbc83
........
安装成功
运行megahit
$ megahit -h # 查看参数
$ megahit -1 KAPA-NDV-9_FKDL210032958-1a_1.clean.fq.gz -2 KAPA-NDV-9_FKDL210032958-1a_2.clean.fq.gz -o megahit_contig_9/ --min-contig-len 2000 # 输出2000bp以上的contig