caffe编译后ImportError: libprotobuf.so.10: cannot open shared object file: No such file or directory+的问

    技术2022-07-11  98

    问题:这里的问题非常明显,就是你没有安装protobuf或者安装的protobuf版本不对,而且有很大概率是你的版本不对

    甚至有可能在编译的时候报错:

    /usr/bin/ld: main.o: undefined reference to symbol '_ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE' //usr/lib/x86_64-linux-gnu/libprotobuf.so.9: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

     

    解决方式:

    对于linux来说,系统是允许你同时安装几个版本的protobuf的,这些库都在

    ··

    /usr/local/lib里面

    ···

    这是由你在安装protobuf库是config的路径决定的,如果报了···no such file···的话,把···/usr/local/lib···下的···libprotobuf*···的库拷贝到···/usr/lib···下即可

    如果存在库但是还是报了这个错误的话,安装10系的protobuf版本(例如protobuf3.0.0即可),9系的版本是protobuf2.6.1

    Processed: 0.013, SQL: 9