Issue 213 in protobuf: libprotobuf.so.6 not found after installation

1,702 views
Skip to first unread message

prot...@googlecode.com

unread,
Aug 20, 2010, 3:49:11 PM8/20/10
to prot...@googlegroups.com
Status: New
Owner: ken...@google.com
Labels: Type-Defect Priority-Medium

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

prot...@googlecode.com

unread,
Aug 20, 2010, 3:58:55 PM8/20/10
to prot...@googlegroups.com
Updates:
Status: WorkingAsIntended

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.


prot...@googlecode.com

unread,
Aug 20, 2010, 4:02:59 PM8/20/10
to prot...@googlegroups.com

Comment #2 on issue 213 by marco.tijuana: libprotobuf.so.6 not found after
installation
http://code.google.com/p/protobuf/issues/detail?id=213

Doh! Sorry I missed that

prot...@googlecode.com

unread,
Aug 20, 2010, 5:53:43 PM8/20/10
to prot...@googlegroups.com

Comment #3 on issue 213 by marco.tijuana: libprotobuf.so.6 not found after
installation
http://code.google.com/p/protobuf/issues/detail?id=213

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.


prot...@googlecode.com

unread,
Aug 20, 2010, 8:00:59 PM8/20/10
to prot...@googlegroups.com

Comment #4 on issue 213 by ken...@google.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213

What is the output of "which protoc"?

prot...@googlecode.com

unread,
Aug 20, 2010, 8:08:11 PM8/20/10
to prot...@googlegroups.com

Comment #5 on issue 213 by marco.tijuana: libprotobuf.so.6 not found after
installation
http://code.google.com/p/protobuf/issues/detail?id=213

$ 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.

prot...@googlecode.com

unread,
Aug 20, 2010, 8:25:19 PM8/20/10
to prot...@googlegroups.com
Updates:
Status: CannotReproduce

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.

prot...@googlecode.com

unread,
Aug 21, 2010, 4:44:13 AM8/21/10
to prot...@googlegroups.com

Comment #7 on issue 213 by holger.hoffstaette: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213

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.

prot...@googlecode.com

unread,
Aug 23, 2010, 11:49:32 AM8/23/10
to prot...@googlegroups.com

Comment #8 on issue 213 by marco.tijuana: libprotobuf.so.6 not found after
installation
http://code.google.com/p/protobuf/issues/detail?id=213

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!


prot...@googlecode.com

unread,
Sep 11, 2011, 7:25:38 AM9/11/11
to prot...@googlegroups.com

Comment #9 on issue 213 by junaidbk...@gmail.com: libprotobuf.so.6 not

@kenton Your instructions worked! Thanks!

prot...@googlecode.com

unread,
Jan 31, 2012, 9:24:09 AM1/31/12
to prot...@googlegroups.com

Comment #10 on issue 213 by raviort...@gmail.com: libprotobuf.so.6 not

Thanks a lot bro...its worked ....

prot...@googlecode.com

unread,
Feb 3, 2012, 6:43:12 PM2/3/12
to prot...@googlegroups.com

Comment #11 on issue 213 by xsheng....@gmail.com: libprotobuf.so.6 not

Thanks a lot! problem solved

prot...@googlecode.com

unread,
Feb 23, 2012, 11:28:52 AM2/23/12
to prot...@googlegroups.com

Comment #12 on issue 213 by bastien....@gmail.com: libprotobuf.so.6 not

Thanks a lot guys !!!!

prot...@googlecode.com

unread,
May 8, 2012, 6:25:09 AM5/8/12
to prot...@googlegroups.com

Comment #13 on issue 213 by svg...@gmail.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213

Thanks a lot guys, Specially comment 8, it works only with
sudo ldconfig



prot...@googlecode.com

unread,
Jun 17, 2012, 11:36:29 AM6/17/12
to prot...@googlegroups.com

Comment #14 on issue 213 by diego.fe...@gmail.com: libprotobuf.so.6 not
ldconfig fixed it for me as well!

thanks

prot...@googlecode.com

unread,
Dec 17, 2012, 4:50:10 PM12/17/12
to prot...@googlegroups.com

Comment #15 on issue 213 by swatiac...@gmail.com: libprotobuf.so.6 not
Thanks a lot! Thumbs up to Comment 8.

prot...@googlecode.com

unread,
Apr 5, 2013, 9:25:11 AM4/5/13
to prot...@googlegroups.com

Comment #16 on issue 213 by samjacob...@gmail.com: libprotobuf.so.6 not
Thanks worked a treat!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

prot...@googlecode.com

unread,
Apr 23, 2013, 8:08:26 AM4/23/13
to prot...@googlegroups.com

Comment #17 on issue 213 by radu.m.t...@gmail.com: libprotobuf.so.6 not
ldconfig made my day

prot...@googlecode.com

unread,
Oct 11, 2013, 3:01:09 PM10/11/13
to prot...@googlegroups.com

Comment #18 on issue 213 by jchan...@gmail.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213

ldconfig saved the day!

To be more verbose, I ran 'sudo ldconfig' after I got the 'protoc: error
while loading shared libraries: libprotobuf.so.6: cannot open shared object
file: No such file or directory' error. Then, protoc works!

prot...@googlecode.com

unread,
Oct 14, 2013, 8:45:28 AM10/14/13
to prot...@googlegroups.com

Comment #19 on issue 213 by faizan.k...@gmail.com: libprotobuf.so.6 not
Thanks a lot ldconfig worked for me too :)

prot...@googlecode.com

unread,
Feb 19, 2014, 6:35:22 PM2/19/14
to prot...@googlegroups.com

Comment #20 on issue 213 by nellaivi...@gmail.com: libprotobuf.so.6 not
I have similar issue in the Cent OS 6.5, ldconfig saved my day. Thanks
Kenton.

prot...@googlecode.com

unread,
Jun 2, 2014, 6:01:15 PM6/2/14
to prot...@googlegroups.com

Comment #21 on issue 213 by DanielKo...@gmail.com: libprotobuf.so.6 not
ldconfig fixed my libprotobuf.so.* problem as well, thanks!

prot...@googlecode.com

unread,
Aug 20, 2014, 6:12:57 PM8/20/14
to prot...@googlegroups.com

Comment #22 on issue 213 by himd...@gmail.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213

@ #8 marco.tijuana
Thanks marco.. saved my day !
'sudo ldconfig' worked on ubuntu 14.04

prot...@googlecode.com

unread,
Aug 20, 2014, 6:16:07 PM8/20/14
to prot...@googlegroups.com

Comment #23 on issue 213 by himd...@gmail.com: libprotobuf.so.6 not found
after installation
http://code.google.com/p/protobuf/issues/detail?id=213

Credit goes to everyone who contributed... but #holger (#7
holger.h...@googlemail.com) pointed out it first first
bravo.. you all genius souls

prot...@googlecode.com

unread,
Aug 25, 2014, 7:08:55 PM8/25/14
to prot...@googlegroups.com

Comment #24 on issue 213 by brendo...@gmail.com: libprotobuf.so.6 not found
after installation
https://code.google.com/p/protobuf/issues/detail?id=213

Running ldconfig solved the problem for me as /usr/local/lib was already
specified in a /etc/ld.so.conf.d/*.conf.
Reply all
Reply to author
Forward
0 new messages