protobuf问题集锦(一)
2013-03-26 15:12
423 查看
问题
按如下步骤在Centos上编译安装Google Protocol Buffers
运行
出现找不到动态库的错误
protobuf 的 README.txt 写得很清楚。
** Hint on install location **
By default, the package will be installed to /usr/local. However,
on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH.
You can add it, but it may be easier to just install to /usr
instead. To do this, invoke configure as follows:
./configure --prefix=/usr
If you already built the package with a different prefix, make sure
to run "make clean" before building again.
解决方法
1. 创建文件 /etc/ld.so.conf.d/libprotobuf.conf 包含内容
2. 运行命令
这时再运行 protoc --version 就可以得到版本号了
按如下步骤在Centos上编译安装Google Protocol Buffers
$ ./configure $ make $ make check $ sudo make install
运行
$ protoc --version
出现找不到动态库的错误
protoc: error while loading shared libraries: libprotobuf.so.7: cannot open shared object file: No such file or directory
原因
protobuf的默认安装位置是 /usr/local,/usr/local/lib 不在Centos系统默认的LD_LIBRARY_PATH 里。这个问题protobuf 的 README.txt 写得很清楚。
** Hint on install location **
By default, the package will be installed to /usr/local. However,
on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH.
You can add it, but it may be easier to just install to /usr
instead. To do this, invoke configure as follows:
./configure --prefix=/usr
If you already built the package with a different prefix, make sure
to run "make clean" before building again.
解决方法
1. 创建文件 /etc/ld.so.conf.d/libprotobuf.conf 包含内容 /usr/local/lib
2. 运行命令
$ sudo ldconfig
这时再运行 protoc --version 就可以得到版本号了
$ protoc --version libprotoc 2.4.0a
相关文章推荐
- Caffe安装中多版本protobuf选择问题
- c++ 使用pbc 解决lua 解析protobuf 问题
- 关于使用protobuf出现undefined reference 的问题
- 【Caffe】手动安装CUDA, cuDNN, opencv 3, boost, glog, gflags, protobuf, nccl指南,以及各种问题的解决方法(CentOS 6.9)
- ubuntu16.04下编译caffe出现.build_release/lib/libcaffe.so: undefined reference to google ::protobuf...的问题
- protobuf进行ParseFromString解包失败的一个常见问题
- iphone5s上使用libprotobuf 崩溃的问题
- Mac OS X 10.9.4编译Protobuf-2.4.1问题
- iOS开发中使用protobuf遇到的一些问题
- caffe配置问题:no module named google.protobuf.internal
- paddlepaddle编译问题汇总:protobuf版本问题和WITH_SWIG_PY默认状态问题
- protobuf编译问题
- PROTOBUF 的错误 也许是GCC版本不对,现在我用的是GCC4.9出现错误。可能要用GCC5才能解决问题
- caffe和caffe2编译无法加载protobuf相关问题解决办法
- 安装protobuf可能遇到的问题
- 求教 ProtoBuf 交互传值 socket 发包 C++ 传stream 到 java 反序列化失败 问题
- protobuf问题总结
- 【转】protobuf2.5.0在<delete [] elements_;>crash的问题。
- Protobuf使用不当导致的程序内存上涨问题
- 关于google protobuf编译找不到不到google\protobuf\stubs\common.h头文件的问题