New issue 213 by marco.tijuana: libprotobuf.so.6 not found after
installation
http://code.google.com/p/protobuf/issues/detail?id=213
After an (apparently) successful installation, I get the following error:
$ protoc
protoc: error while loading shared libraries: libprotobuf.so.6: cannot open
shared object file: No such file or directory
What steps will reproduce the problem?
1. make distclean
2. ./configure &> /home/marco/configure.log || echo "ERROR"
3. make &> /home/marco/make.log || echo "ERROR"
4. sudo make install &> /home/marco/install.log || echo "ERROR"
(output files attached)
All files seem to be in place:
$ls -la /usr/local/lib/libproto*
-rw-r--r-- 1 root root 13709948 Aug 20 11:31 /usr/local/lib/libprotobuf.a
-rwxr-xr-x 1 root root 960 Aug 20 11:31 /usr/local/lib/libprotobuf.la
-rw-r--r-- 1 root root 1770736 Aug 20 11:31
/usr/local/lib/libprotobuf-lite.a
-rwxr-xr-x 1 root root 995 Aug 20 11:31
/usr/local/lib/libprotobuf-lite.la
lrwxrwxrwx 1 root root 25 Aug 20 11:31
/usr/local/lib/libprotobuf-lite.so -> libprotobuf-lite.so.6.0.0
lrwxrwxrwx 1 root root 25 Aug 20 11:31
/usr/local/lib/libprotobuf-lite.so.6 -> libprotobuf-lite.so.6.0.0
-rwxr-xr-x 1 root root 882428 Aug 20 11:31
/usr/local/lib/libprotobuf-lite.so.6.0.0
lrwxrwxrwx 1 root root 20 Aug 20 11:31 /usr/local/lib/libprotobuf.so
-> libprotobuf.so.6.0.0
lrwxrwxrwx 1 root root 20 Aug 20 11:31
/usr/local/lib/libprotobuf.so.6 -> libprotobuf.so.6.0.0
-rwxr-xr-x 1 root root 6190003 Aug 20 11:31
/usr/local/lib/libprotobuf.so.6.0.0
-rw-r--r-- 1 root root 11961690 Aug 20 11:31 /usr/local/lib/libprotoc.a
-rwxr-xr-x 1 root root 976 Aug 20 11:31 /usr/local/lib/libprotoc.la
lrwxrwxrwx 1 root root 18 Aug 20 11:31 /usr/local/lib/libprotoc.so ->
libprotoc.so.6.0.0
lrwxrwxrwx 1 root root 18 Aug 20 11:31 /usr/local/lib/libprotoc.so.6
-> libprotoc.so.6.0.0
-rwxr-xr-x 1 root root 4695868 Aug 20 11:31
/usr/local/lib/libprotoc.so.6.0.0
What version of the product are you using? On what operating system?
protobuf-2.3.0 on Linux RedHat
Attachments:
configure.log 10.8 KB
install.log 15.0 KB
make.log 68.6 KB
Comment #1 on issue 213 by ken...@google.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213
Please follow the instructions in README.txt:
** Hint on install location **
By default, the package will be installed to /usr/local. However,
on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH.
You can add it, but it may be easier to just install to /usr
instead. To do this, invoke configure as follows:
./configure --prefix=/usr
If you already built the package with a different prefix, make sure
to run "make clean" before building again.
Doh! Sorry I missed that
I take it back, installing in /usr does not solve the problem.
(yes I did 'make uninstall' and 'make distclean' before doing that).
The only way to launch programs that link libprotobuf is the following:
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ protoc
(same for /usr/lib/)
I don't think this is a problem on the machine itself because other
programs that use libraries in /usr/lib and /usr/local/lib work fine.
Only Protobuf throws this error.
This happens ONLY on RedHat with both protobuf 2.2 and 2.3.
On other systems they work fine.
If you want more info (tools versions etc) just ask.
What is the output of "which protoc"?
$ which protoc
/usr/local/bin/protoc
This is after installing with default --prefix of course
find doesn't find any other protoc installed.
This is not just protoc, my own programs that link protobuf produce the
same output.
Comment #6 on issue 213 by ken...@google.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213
I'm sorry, but I can't help you debug this. Most likely, when you
installed with /usr as the prefix, you did something wrong -- maybe you
forgot to "make clean" when you reconfigured, or maybe you tried to "make
uninstall" after reconfiguring so it didn't actually uninstall, or
something. I don't know. But the problem is not with the protobuf package
-- everything to do with linking and choosing install locations is handled
by the GNU autotool chain, which is used by a huge number of open source
packages.
A typical reason for this behaviour is a stale ld.so.cache; try to run
ldconfig to update it after making sure that /usr/local/lib is listed in
/etc/ld.so.conf.
Great! That was it.
I tried re-doing everything from scratch and I was still getting the same
error.
But after running ldconfig works fine!
Thanks a lot!
@kenton Your instructions worked! Thanks!
Thanks a lot bro...its worked ....
Thanks a lot! problem solved
Thanks a lot guys !!!!