When need to install
If you use the protoc command, if you encounter Protoc not found, it means it is not installed. Or, an error occurred during execution: This parser only recognizes "proto2", it means it is not version 3.0.
Installation process and possible problems
Installation instructions
For a detailed introduction, please refer to this article: A brief introduction to protobuf and installation under ubuntu 16.04
Execute the following commands in sequence to download the source code, compile and install, it takes a long time, more than 10 minutes.
sudo apt-get install autoconf automake libtool curl make g++ unzip
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
. /autogen.sh
. /configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
May encounter problems
It is very likely that 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 autoconf
sudo apt-get install automake
sudo apt-get install libtool
After the installation is complete
Execute the following command to verify the installation result and check the version number.
protoc --version
Congratulations: libprotoc 3.9.0 or higher version number.
to sum up
The above is the tutorial for 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. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!
Recommended Posts