1 Downloads Protobuf
Https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz
2 Enter the directory of the downloaded file
1 tar -zxvf protobuf-2.6. 1. Tar . GZ 2 cd protobuf-2.6. 1/3 ./Configure4make5 make check 6makeinstall
I have the following problems when I execute the./configure
Solutions
sudo Install build-essential
3 Check if the installation is successful
Protoc--version
If the installation succeeds, the version number will appear as
2.6. 1
If there is a problem, the error content will be output
Finally, I completed the installation, with the above command to check the version number when the following problem occurs
Protoc:error while loading shared libraries:libprotocbuf.so.9:cannot open shared
Cause of error
The default installation path for PROTOBUF is/usr/local/lib, and/usr/local/lib is not in the default Ld_library_path of the Ubuntu system, so Lib is not found
Solutions
1 Create the file bprotobuf.conf file in the/etc/ld.so.conf.d/directory, the file content is as follows
/usr/local/lib
2 input commands
sudo ldconfig
Then, enter Protoc--version to see the version number as normal.
For more information about/etc/ld.so.conf.d/, please refer to the following article for instructions
http://blog.csdn.net/apn172/article/details/8868968
http://blog.csdn.net/yjkwf/article/details/7545002
PROTOBUF learning------ubuntu14.04 under protobuf2.6 installation