protoc install

来源:互联网 发布:随机语音聊天软件 编辑:程序博客网 时间:2024/06/08 11:33

http://tech.yipp.ca/linux/install-google-protocol-buffers-linux/


notes: default install path is /usr/local/bin , if you want to change install path, please use ./configure --prefix=/usr  (/usr/lib)

Q:/usr/bin/protoc: error while loading shared libraries: libprotobuf.so.8: cannot open shared object file: No such file or directory

A:export LD_LIBRARY_PATH=/usr/lib

Q: ldd sys ; there is no found  libprotobuf.so.9

A: protobuf-2.6.1 dependent lib is  libprotobuf.so.9. 

protobuf-2.5 dependent lib is  libprotobuf.so.8. 

please change right version


Step 1. Download source code :
https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz

Step 2. Extract :

$> tar -xzvf protobuf-2.6.1.tar.gz

Step 3. Build and install:

$> cd protobuf-2.6.1
$> ./configure
$> make
$> sudo make install

For old version 2.5.0

 Step 1. Download source code :
https://code.google.com/p/protobuf/downloads/detail?name=protobuf-2.5.0.tar.bz2
update, repo was moved to:
https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.gz

Step 2. Extract :

$> tar -xzvf protobuf-2.5.0.tar.gz

Step 3. Build and install:

$> cd protobuf-2.5.0
$> ./configure
$> make
$> sudo make install

 


原创粉丝点击