编译的正常流程:
git clone -b v2.6.1 https://github.com/protocolbuffers/protobuf.git sudo apt-get install build-essential ./configure make make check sudo make install sudo ldconfig protoc --version 但是你发现源码里面没有configure,只有一个configure.ac但是这个却不是我们想要的,所以我们必须要弄出configure,执行下面命令
aclocal
autoconf
autoheader
automake --add-missing
结果报错了:
configure.ac:75: error: required file './ltmain.sh' not found
为了消灭这个错误执行:
sudo apt install libtool
libtoolize --automake --copy --debug --force
ok重新上面configure命令,然后在回到上面命令继续编译即可。