protoc: error while loading shared libraries: libprotobuf.so.0: cannot open shared object file: No such file or directory

16,030 views
Skip to first unread message

一首诗

unread,
Jul 11, 2008, 3:15:58 AM7/11/08
to Protocol Buffers
After I have installed protoc, I tried this command:

sudo protoc -I=~/test/pb2/src/pb/ --python_out=~/test/pb2/src/python/
addressbook.proto

BUT what I got is:

protoc: error while loading shared libraries: libprotobuf.so.0: cannot
open shared object file: No such file or directory

The library is where it should be

libprotobuf.so: /usr/local/lib/libprotobuf.so.0 /usr/local/lib/
libprotobuf.so

What's the problem?

Alkis Evlogimenos ('Αλκης Ευλογημένος)

unread,
Jul 11, 2008, 3:33:32 AM7/11/08
to 一首诗, Protocol Buffers
You most likely do not have /usr/local/lib in your dynamic loader's library path.
--

Alkis

一首诗

unread,
Jul 11, 2008, 3:49:18 AM7/11/08
to Protocol Buffers
Oh, I checked my "etc/ld.so.conf.d/libc.conf"

There is

"/usr/local/lib"

--------------------

I've ran "make test" and everything seems OK.

On Jul 11, 3:33 pm, "Alkis Evlogimenos ('Αλκης Ευλογημένος)"

一首诗

unread,
Jul 11, 2008, 3:52:27 AM7/11/08
to Protocol Buffers
OK, I figured it out, you have to set environment varialbe:

export LD_LIBRARY_PATH=/usr/local/lib

I'm using ubuntu server edition. Hope this could help others :)

Kenton Varda

unread,
Jul 11, 2008, 4:02:10 AM7/11/08
to 一首诗, Protocol Buffers
I'm kind of surprised to hear this issue reported so much.  Is the protobuf package somehow different from all the other autoconf-based library packages out there?  Or is it just that people rarely install libraries from source packages, preferring apt-get instead?

In any case, I guess the readme should really suggest using --prefix=/usr.

Also, why the heck do linux distros not include /usr/local/lib in the library path automatically, given that the every autoconf package installs there by default?

2008/7/11 一首诗 <newp...@gmail.com>:

一首诗

unread,
Jul 11, 2008, 4:09:47 AM7/11/08
to Protocol Buffers
I've installed some applications from source code on ubuntu, that's
not that easy.

Maybe Ubuntu is not so compatible with other distros

But apt-get do save a lot of time, when what you want to install
depends on many other packages.

On Jul 11, 4:02 pm, "Kenton Varda" <ken...@google.com> wrote:
> I'm kind of surprised to hear this issue reported so much. Is the protobuf
> package somehow different from all the other autoconf-based library packages
> out there? Or is it just that people rarely install libraries from source
> packages, preferring apt-get instead?
> In any case, I guess the readme should really suggest using --prefix=/usr.
>
> Also, why the heck do linux distros not include /usr/local/lib in the
> library path automatically, given that the every autoconf package installs
> there by default?
>
> 2008/7/11 一首诗 <newpt...@gmail.com>:

lasiz...@gmail.com

unread,
Jul 11, 2008, 3:29:40 PM7/11/08
to Protocol Buffers
After `sudo ldconfig /usr/local/lib` I no see this problem again
Reply all
Reply to author
Forward
0 new messages