Question: samtools: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
2
gravatar for wschrein
3 months ago by
wschrein20
wschrein20 wrote:

Hi everyone. I keep getting this error message with samtools. I have used samtools in the past plenty of times. I am not sure how to solve it. Any help would be greatly appreciated.

samtools: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory

I have tried googling the error. Nothing specific with respect to samtools has come up. However, there were some fixes that I tried:

sudo yum install bzip2-devel sudo ln -s find /usr/lib64/ -type f -name "libbz2.so.1*" /usr/lib64/libbz2.so.1.0

However, it asks for a login when I try this fix or others.

rna-seq samtools • 1.5k views
ADD COMMENTlink modified 3 months ago by anthonycor70 • written 3 months ago by wschrein20
1
sudo yum install bzip2-devel

will ask for admin/sudo pass word because you are trying to install a package. If you are the administrator, furnish pass word and if you are not the administrator, request your administrator to install bzip2-devel or request him/her to give you sudo privileges.

Btw, did you check the version of bzip2-devel on the system, you have access to? If it doesn't exist, then one should do above step. If it is already existing, either you have to update or a simple soft linking (given below) should be enough. However you need root/sudo privileges to make any changes at system leve.

sudo `ln -s find /usr/lib64/ -type f -name "libbz2.so.1*"` /usr/lib64/libbz2.so.1.0

You are soft linking a file in root file system. Again, you need to furnish password to make system wide change.

ADD REPLYlink modified 3 months ago • written 3 months ago by cpad01123.0k

Which version of samtools? Was it recently updated? Did you install samtools yourself? Are you the administrator of the computer?

ADD REPLYlink written 3 months ago by h.mon9.2k

It is version 1.5. I used bioconda to install samtools. I had used samtools successfully multiple times over the past few months. Suddenly, today I had this issue. I also updated samtools after this issue popped up and that did not seem to fix the issue

I am not the administrator. I have an account on a linux server, CentOS 6.6.

ADD REPLYlink written 3 months ago by wschrein20
7
gravatar for anthonycor
3 months ago by
anthonycor70
Rochester, NY USA
anthonycor70 wrote:

From https://github.com/bioconda/bioconda-recipes/pull/5049#issuecomment-311070184

bioconda now requires conda-forge and the conda-forge version of bzip2 uses shared libraries, while the one in the main channel uses a static library. Since it was compiled against the shared library version you need to also have than included in your environment. Hope this fixes it for you.

Try installing samtools with conda-forge included:

conda install -c conda-forge -c bioconda samtools bzip2

ADD COMMENTlink modified 3 months ago • written 3 months ago by anthonycor70
1

I had a similar problem and this worked for me. Thanks.

ADD REPLYlink written 3 months ago by Eric Kay10

Same here. What should the order be in my .condarc? Currently it's:

channels:
  - bioconda
  - r
  - defaults
  - conda-forge

Should this be reordered?

ADD REPLYlink written 8 weeks ago by Stephen2.6k
1

Put conda-forge second, after bioconda.

ADD REPLYlink written 8 weeks ago by Devon Ryan73k
1
gravatar for Devon Ryan
3 months ago by
Devon Ryan73k
Freiburg, Germany
Devon Ryan73k wrote:

Try updating or installing bzip2 via conda. Until relatively recently the .so file wasn't included, so samtools (and everything else) needed to use whatever was installed on your system. If that doesn't work, ask the systems administrator to install libbz2, which they will likely be happy to do.

ADD COMMENTlink written 3 months ago by Devon Ryan73k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1390 users visited in the last hour