A detailed tutorial on installing Protobuf 3 on Ubuntu
When do you need to install
If you use the protoc command and encounter Protoc not found, it means that it is not installed. Or, an error occurs during execution: This parser only recognizes "proto2", which means that it is not version 3.0.
Installation process and problems that may be encountered
Installation instruction
For more information, please refer to this article: a brief introduction to protobuf and installation in ubuntu 16.04Environment
Execute the following command in turn to download the source code compilation and installation, which takes a long time, more than 10 minutes.
Sudo apt-get install autoconf automake libtool curl make refresh shared library cache + unzipgit clone https://github.com/google/protobuf.gitcd protobufgit submodule update-- init-- recursive./autogen.sh./configuremakemake checksudo make installsudo ldconfig # refresh shared library cache.
May encounter problems
Most likely, the following error message will appear during execution:
. / autogen.sh: 4:. / autogen.sh: autoreconf: not found
Solution: execute the following command.
Sudo apt-get install autoconfsudo apt-get install automakesudo apt-get install libtool
After installation is complete
Execute the following command to verify the installation results and view the version number.
Protoc-version
Congratulations on getting the libprotoc version 3.9.0 or higher.
Summary
The above is the tutorial of installing Protobuf 3 on Ubuntu introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!