LINUX下编译安装PROTOBUF

来源:互联网 发布:网络的利与弊400字 编辑:程序博客网 时间:2024/05/19 14:16

下载protobuf-2.5.0.tar.gz:
http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
安装:
tar zxvf protobuf-2.4.1.tar.gz
cd protobuf-2.4.1
./configure
make
make check
make install
安装结束。
验证:
查看是否安装成功:protoc --version
如果出现:libprotoc 2.5.0 则说明安装成功!
如果出现错误:protoc: error while loading shared libraries: libprotobuf.so.0: cannot open hared object file: No such file or directory


原因是:The issue is that Ubuntu 8.04 doesn't include /usr/local/lib in library paths.

解决办法:To fix it for your current terminal session, just type in
执行:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
0 0
原创粉丝点击