在解决这个报错的过程中,我学到了Linux下解决问题的一种新思路。这个报错很早之前就遇到过,当时是用自己安装的miniconda来下载安装samtools(非root用户),安装完成之后运行就这样报错了,但是其他的软件又可以正常运行,比如bwa。今天安装deeptools,也是这个情况:成功安装了,就是无法运行,显示缺文件。

我在/usr/lib64/文件夹下面找了找,看到了类似的文件

$ cd /usr/lib64/

$ ll libbz2*

lrwxrwxrwx. 1 root root 11 Aug 30 2018 libbz2.so -> libbz2.so.1

lrwxrwxrwx. 1 root root 15 Aug 30 2018 libbz2.so.1 -> libbz2.so.1.0.6

-rwxr-xr-x. 1 root root 67K Nov 20 2015 libbz2.so.1.0.6

这几个文件(其实只有一个libbz2.so.1.0.6)和我们需要的libbz2.so.1.0名称很相似,猜测作用应该是一样的,能不能软链接一下?肯定是不行的,非root用户没有权限在/usr/lib64/这种目录下面瞎搞。

$ ln -s libbz2.so.1 libbz2.so.1.0

ln: failed to create symbolic link ‘libbz2.so.1.0’: Permission denied

不过我有个办法,就是把/usr/lib64/下面的这几个文件拷贝到自己的目录下面,这样就能肆意盘它了。问题又来了,拷贝到哪个目录下面?我放到了mypath/miniconda3/lib下面,因为既然目录名称都叫"lib",说明存放的文件类别相同,并且我在mypath/miniconda3/lib下面也找到了很多lib*so*这样的文件。

$ cp libbz2.so.1 ~/miniconda3/lib

接着在mypath/miniconda3/lib目录下面软链接或是改名称

$ cd ~/miniconda3/lib

$ ln -s libbz2.so.1 libbz2.so.1.0

$ ll libbz2*

-rwxr-xr-x. 1 huangsiyuan grp3 67K Jul 9 19:39 libbz2.so.1

lrwxrwxrwx. 1 huangsiyuan grp3 11 Jul 9 19:43 libbz2.so.1.0 -> libbz2.so.1

再运行bamCoverage或是samtools就没问题了

linux libbz2.so.1,libbz2.so.1.0: cannot open shared object file: No such file or directory相关推荐

  1. linux环境下可执行文件,提示libboost_thread.so.1.71.0: cannot open shared object file: No such file or directory

    在linux环境下执行可执行文件时,提示这个错误error while loading shared libraries: libboost_thread.so.1.71.0: cannot open ...

  2. Linux mtk flash_tool -error while loading shared libraries: libpng12.so.0: cannot open shared object

    运行flash_tool时报错: ./flash_tool: error while loading shared libraries: libpng12.so.0: cannot open shar ...

  3. OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory 解决方法

    OSError: libcudart.so.8.0: cannot open shared object file: No such file or directory 解决方法 检查cuda8是否安 ...

  4. mongod: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file:

    mongod: error while loading shared libraries: libcrypto.so.1.0.0: cannot open shared object file: No ...

  5. libgstreamer-1.0.so.0: cannot open shared object file: No such file or directory

    1. 问题现象 error while loading shared libraries: libgstreamer-1.0.so.0: cannot open shared object file: ...

  6. tensorflow-gpu版本出现libcublas.so.8.0:cannot open shared object file

    文章主要参考以下博客https://www.aliyun.com/zixun/wenji/1289957.html 在利用GPU加速tensorflow时,出现了libcublas.so.8.0:ca ...

  7. libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

    安装完python3.7.5之后,pip3.7.5 install psutil --user 报错: libpython3.7m.so.1.0: cannot open shared object ...

  8. ImportError: libopenblas.so.0: cannot open shared object file

    ImportError: libopenblas.so.0: cannot open shared object file 解决: sudo apt-get install libopenblas-d ...

  9. ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

    ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory 安装cuda9.1 安 ...

  10. ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory

    ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory 出现这个问题的原因, ...

最新文章

  1. unity项目中使用BUGLY遇到的的几个问题
  2. Windows——蓝屏[失败的操作:HardwareProtect_x64.sys]解决方案
  3. AdaBoost算法源码分析
  4. zookeeper配置
  5. x3-02 java_Day13 -- Java流程控制02
  6. When allowCredentials is true, allowedOrigins cannot contain the special value “*“ that cannot be
  7. React之回调函数形式的ref
  8. matlab2016b ubuntu命令行安装 + matconvnet的安装
  9. python利用numpy存取文件
  10. Java 并发编程之内置锁 synchronized
  11. 一个做得很好的电子产品测评类网站:Zealer
  12. 脚本——web_custom_request函数详解
  13. AHOI2018训练日程(3.10~4.12)
  14. 文章章节常用序号编排(数字序号顺序)
  15. linux删除用户账户_如何在Linux中删除删除用户帐户?
  16. 这个时代,“寒门再难处贵子”【转载】
  17. 开机自启动夜神模拟器全屏并打开指定apk
  18. 【积水成渊-逐步定制自己的Emacs神器】4:Emacs自动补全
  19. Altium Designer 10对集成库的理解
  20. 小程序 正整数与char(character)的相互转换,十六进制与十进制相互转换

热门文章

  1. 常染色体的隐性疾病数学建模(代数模型)
  2. Leetcode--826. 安排工作以达到最大收益
  3. MVC里面写html获取不到input,asp.net-mvc – ASP.Net [HiddenInput]数据属性在Razor中用Html.EditorForModel渲染时不起作用?...
  4. canvas 实现图片局部模糊_小技巧!H5使用Html2Canvas实现自动截屏(下)
  5. python输出子列表_python利用递归函数输出嵌套列表的每个元素
  6. freeswitch 发update sip消息_LeetCode LCP 05——发 LeetCoin
  7. MATLAB imshow之后在四周加上边框
  8. QT学习笔记(二):QT MinGW 和 MSVC 编译方式
  9. 计算机视觉(一)概述
  10. 二维与三维之间的桥梁——点云