利用caffe的caffenet运行bvlc_reference_caffenet.caffemodel时(即试验一下caffe/examples/images的猫的图片),,命令行如下:
./build/examples/cpp_classification/classification.bin models/bvlc_reference_caffenet/deploy.prototxt models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel data/ilsvrc12/imagenet_mean.binaryproto data/ilsvrc12/synset_words.txt examples/images/cat.jpg
出现如下错误:
./build/examples/cpp_classification/classification.bin: error while loading shared libraries: libprotobuf.so.8: cannot open shared object file: No such file or directory
首先,ubuntu下搜索了全部文件,是有libprotobuf.so.8这个文件的,那么就应该是运行时路径错误找不到该文件。
因为,lib文件默认有/usr/lib或/usr/local/lib等,
找到libprotobuf.so.8所在lib目录,命令行输入
export LD_LIBRARY_PATH=/usr/local/lib #需要输入你的目录