Transferred from: http://www.tuicool.com/articles/VfQfM3
1. Download Protobuf source code (currently the latest version is: 2.5.0)
#cd/opt
#wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
2. Unzip, compile, install
#tar ZXVF protobuf-2.5.0.tar.gz
#cd protobuf-2.5.0
#./configure
#make
#make Check
#make Install
3. Continue to install the Protobuf Python module (Skip this step if you are not using Python)
#cd./python
#python setup.py Build
#python setup.py Test
#python setup.py Install
4. Install complete, verify the Linux command
#protoc –version
5. Verify that the Python module is installed correctly
#python
>>>import Google.protobuf
If no error is indicated, the installation is normal.
Note:
Error:package directory ' Google/protobuf/compiler ' does not exist
Workaround: Create the compiler folder under google/protobuf/
Run again under the Protobuf folder: Python setup.py install
Python version protobuf installation