Caffe: glog shared library missing

Created on 16 Apr 2014  ·  8Comments  ·  Source: BVLC/caffe

I tried following all installation instructions and then running the MNIST demo but it seems that there I have no glog shared library (see below). Did I miss some step that would automatically generate this, or must I do it manually from the glog source? I'm a linux/Ubuntu novice so any pointers would be much appreciated.

$ ./create_mnist.sh
Creating leveldb...
../../build/examples/lenet/convert_mnist_data.bin: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory
../../build/examples/lenet/convert_mnist_data.bin: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory
Done.

Most helpful comment

I got it to work, for the moment.
Although I have /usr/local/lib in my /etc/ld.so.conf file, the linker still isn't finding the library. I don't understand why. So I added the directory explicitly to the path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
and then create_mnist.sh worked ok.

Thanks to the caffe team, btw.

All 8 comments

I assume you're referring to the commands I've pasted below. I executed them without error and many libglog .o files were created but there is no .so file and /usr/lib/ has nothing pertaining to glog. The installation instructions are of no further help. Should I be able to locate libglog.so somewhere and if so, where? Thanks.

wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
tar zxvf glog-0.3.3.tar.gz
./configure
make && make install

hm, perhaps you need to do sudo make install?

I executed all commands with sudo.

Ah. I see that the installer put things in /usr/local/lib rather than /usr/lib. So I guess I have some path issues.

I got it to work, for the moment.
Although I have /usr/local/lib in my /etc/ld.so.conf file, the linker still isn't finding the library. I don't understand why. So I added the directory explicitly to the path:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
and then create_mnist.sh worked ok.

Thanks to the caffe team, btw.

@mattroos After adding to ld.so.conf, run ldconfig with sudo. Then the runtime linker will be able to find.

@mavenlin Thanks. Yes that was eventually the "fix" I used for that library as well as others. It was a bit confusing as my ld.so.conf file was including other files in another directory but I just ignored that approach and added everything directly to ld.so.conf.

Was this page helpful?
0 / 5 - 0 ratings