参考:
安装blast
https://blog.csdn.net/flyfrommath/article/details/52945586
error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such_libnsl.so.1 cannot open-CSDN博客
https://blog.csdn.net/qq_42629988/article/details/121180464
首先找到ncbi的ftp,找到需要的版本。这里我选的是可执行文件,因为不想手动编译了。
https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+
我这里想安装2.7.1,所以找到适合的版本,复制链接
在服务器指定路径下进行下载:
wget https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.7.1/ncbi-blast-2.7.1+-x64-linux.tar.gz
解压缩:
tar -zxvf ncbi-blast-2.7.1+-x64-linux.tar.gz
解压后进入blast目录,找到bin文件夹,这里放了相关的可执行文件,所以需要把这个路径加入~/.bashrc,然后source一下生效:
export PATH=/xxxx/blast/bin:$PATH
此时执行blastn,发现报错:
blastn: error while loading shared libraries: libnsl.so.1: cannot open shared object file: No such file or directory
首先,需要检查系统中是否已安装libnsl:
sudo find / -name libnsl
如果有的话,修改软链接即可。如果没有,则需要手动安装:
yum install libnsl
安装完毕后,检查:
[root@localhost ~]# blastn -version
blastn: 2.7.1+Package: blast 2.7.1, build Oct 18 2017 19:57:24