Protobuf cannot find shared libraries
Protocol BuffersProtocol Buffers Problem Overview
I have installed protobuf by using following commands:
./configure
make
make check
make install
However when I run protoc
I get following error:
protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
Protocol Buffers Solutions
Solution 1 - Protocol Buffers
sudo ldconfig
or
export LD_LIBRARY_PATH=/usr/local/lib
should solve the problem.
Solution 2 - Protocol Buffers
Solution 3 - Protocol Buffers
This issue can be resolved by following these steps:
- vim /etc/ld.so.conf
- /usr/local/lib(add it in .conf)
Solution 4 - Protocol Buffers
This issue can be resolved by following these steps:
sudo make uninstall
sudo make distclean
sudo make clean
./configure --prefix=/usr
This cleans the current installation and installs protobuf at /usr Run ldconfig to update ld.so.cache after making sure that /usr/local/lib is listed in /etc/ld.so.conf. i.e. Edit /etc/ld.so.conf and append /usr/local/lib to it and run ldconfig