Configure protobuf in Ubuntu

Source: Internet
Author: User
I recently tried protobuf many times but failed to use it. I used ubuntu. protobuf also used many versions under the virtual machine, but it was not successful. In the end, version 250 is used to complete the configuration. First get pr

 

I recently tried protobuf many times but failed to use it. I used ubuntu. protobuf also used many versions under the virtual machine, but it was not successful. The final version is 2.5.0. 

 

Sort out the configuration process.

First, obtain the package file corresponding to protobuf. enter the following on the terminal:

 

wget http://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz 

Decompress the downloaded package

 

 

tar zxvf protobuf-2.5.0.tar.gz 

 

Go to the extract Directory

 

cd protobuf-2.5.0
Run

 

 

./configure  

Errors may occur in the middle. it is estimated that G ++ is not properly installed because compilation is required during installation.

 

Install G ++

apt-get install g++
In addition, it is best to install Vim and make. otherwise, problems may occur in the future. I have not mentioned these in other tutorials. I would like to share my personal experience with you.

 

 

apt-get install vim

apt-get install make

./After configure is successful, perform the following steps:

 

 

make make checkmake install

 

Run the command on the terminal after installation.

 

vim ~/.profile

 

Open the configuration file and add

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

Save and exit, and then execute

 

source ~/.profile

 

Is the configuration file modification takes effect, the last execution

 

protoc --version

 

Check the protobuf version to test whether the installation is successful.

The following links can be used for subsequent operations. they are well written.

 

Http://hahaya.github.io/2013/08/12/use-protobuf-in-c-plus-plus.html

 

Http://www.ccvita.com/507.html



 



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.