conda新安装的软件运行报错,怎么办?
测试开头
测试结尾
今天是生信星球陪你的第794天
大神一句话,菜鸟跑半年。我不是大神,但我可以缩短你走弯路的半年~
就像歌儿唱的那样,如果你不知道该往哪儿走,就留在这学点生信好不好~
这里有豆豆和花花的学习历程,从新手到进阶,生信路上有你有我!
豆豆写于2021.3.12
conda出现以后,我们安装软件就不需要再折腾了,省了大量的时间。相信看到推送的你,对于conda也不再陌生。但今天遇到一个问题,需要注意一下
安装bowtie2成功却运行失败
报错信息如下:
$ conda create -n test -c bioconda bowtie2 -y
$ conda activate test
$ bowtie2
~/.conda/envs/test/bin/bowtie2-align-s: error while loading shared libraries: libtbb.so.2: cannot open shared object file: No such file or directory
(ERR): Description of arguments failed!
Exiting now ...
本来以为是安装的bowtie2版本太新,结果切换一个旧版本还是不行
然后搜索看到有人也遇到了一样的问题:
https://www.biostars.org/p/494922/
他给出的解决方案是:
$ conda install tbb=2020.2 -y
# 此时就可以正常运行
$ bowtie2 -h
安装samtools成功却运行失败
报错信息是:
samtools: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No such file or directory
在https://github.com/bioconda/bioconda-recipes/issues/12100搜索的解决方案是:
conda install openssl=1.0 -y
小结
虽然现在软件安装方便了许多,但还是存在一些隐藏的bug(尤其是软件新版本)
一般可以考虑:
-
降低软件版本(指定安装某个稳定的版本)
-
搜索conda安装动态库
最后,再放上conda几个常用的操作
# 清华源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --set show_channel_urls yes
# 北外源:
conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.bfsu.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
# 修改为官方源:
conda config --remove-key channels
conda config --add channels r
conda config --add channels conda-forge
conda config --add channels bioconda
# 指定搜某个版本
conda install samtools=1.8 -y
#删除一个环境中某个软件
conda remove -n test samtools -y
#删除整个环境
conda remove -n test --all
#或者直接 rm -rf $HOME/miniconda3/envs/test/
# conda强迫症选项(隐藏base)
conda config --set auto_activate_base False
点击底部的“阅读原文”,获得更好的阅读体验哦😻
初学生信,很荣幸带你迈出第一步
🤓生信星球 🌎~ 一个不拽术语、通俗易懂的生信知识平台
请关注“恒诺新知”微信公众号,感谢“R语言“,”数据那些事儿“,”老俊俊的生信笔记“,”冷🈚️思“,“珞珈R”,“生信星球”的支持!