我正在按照以下链接进行caffe安装: https://gist.github.com/arundasan91/b432cb011d1c45b65222d0fac5f9232c
我正在使用Ubuntu 18.04 LTS
$ make runtest -j 8
我收到以下错误:
.build_release/tools/caffe
.build_release/tools/caffe: error while loading shared libraries:
libprotobuf.so.15: cannot open shared object file: No such file or directory
Makefile:532: recipe for target 'runtest' failed
make: *** [runtest] Error 127
进一步调查:
$ locate libprotobuf
/home/<username>/opt/matlab/bin/glnxa64/libprotobuf.so.9
/home/<username>/opt/matlab/bin/glnxa64/libprotobuf.so.9.0.1
/snap/gnome-3-26-1604/59/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9
/snap/gnome-3-26-1604/59/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9.0.1
/snap/gnome-3-26-1604/59/usr/share/doc/libprotobuf-lite9v5
/snap/gnome-3-26-1604/59/usr/share/doc/libprotobuf-lite9v5/changelog.Debian.gz
/snap/gnome-3-26-1604/59/usr/share/doc/libprotobuf-lite9v5/copyright
/snap/gnome-3-26-1604/64/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9
/snap/gnome-3-26-1604/64/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9.0.1
/snap/gnome-3-26-1604/64/usr/share/doc/libprotobuf-lite9v5
/snap/gnome-3-26-1604/64/usr/share/doc/libprotobuf-lite9v5/changelog.Debian.gz
/snap/gnome-3-26-1604/64/usr/share/doc/libprotobuf-lite9v5/copyright
/snap/gnome-3-26-1604/70/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9
/snap/gnome-3-26-1604/70/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9.0.1
/snap/gnome-3-26-1604/70/usr/share/doc/libprotobuf-lite9v5
/snap/gnome-3-26-1604/70/usr/share/doc/libprotobuf-lite9v5/changelog.Debian.gz
/snap/gnome-3-26-1604/70/usr/share/doc/libprotobuf-lite9v5/copyright
/snap/gnome-logs/31/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.10
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.10.0.0
/usr/lib/x86_64-linux-gnu/libprotobuf.so.10
/usr/lib/x86_64-linux-gnu/libprotobuf.so.10.0.0
/usr/share/doc/libprotobuf-lite10
/usr/share/doc/libprotobuf10
/usr/share/doc/libprotobuf-lite10/changelog.Debian.gz
/usr/share/doc/libprotobuf-lite10/copyright
/usr/share/doc/libprotobuf10/changelog.Debian.gz
/usr/share/doc/libprotobuf10/copyright
/var/lib/dpkg/info/libprotobuf-lite10:amd64.list
/var/lib/dpkg/info/libprotobuf-lite10:amd64.md5sums
/var/lib/dpkg/info/libprotobuf-lite10:amd64.shlibs
/var/lib/dpkg/info/libprotobuf-lite10:amd64.triggers
/var/lib/dpkg/info/libprotobuf10:amd64.list
/var/lib/dpkg/info/libprotobuf10:amd64.md5sums
/var/lib/dpkg/info/libprotobuf10:amd64.shlibs
/var/lib/dpkg/info/libprotobuf10:amd64.triggers
我发现这是一个python问题。所以我做到了:
$ which protoc
/home/<user_name>/anaconda2/bin/protoc
$ protoc --version
libprotoc 3.5.1
我检查了conda,正在使用conda的最新protobuf。另外,如果我降级protobuf,“ caffe / python / requirements.txt”中的列表也不会通过。谢谢您的帮助。