Error while loading shared libraries: libbz2.so.1.0: cannot open shared object file on CentOS 7

Whilst trying to build using electron-builder on CentOS 7, I ran into the following error message:

error while loading shared libraries: libbz2.so.1.0: cannot open shared object file

To fix it, you’ll need to install bzip2-devel, and potentially create a symlink too as libbz2.so.1 exists, but libbz2.so.1.0 doesn’t

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

Michael is a polyglot software engineer, committed to reducing complexity in systems and making them more predictable. Working with a variety of languages and tools, he shares his technical expertise to audiences all around the world at user groups and conferences. You can follow @mheap on Twitter

Thoughts on this post

Rui 2017-06-30

Thank you!!! 😀

Sean Sanker 2017-07-10

This helped a lot. Thanks!

Evandro Grezeli 2017-11-01

Thanks!!!

Leave a comment?

Leave a Reply