git clone https://github.com/google/protobuf.git
cd protobuf/
git clone https://github.com/google/googlemock.git
mv googlemock gmock
./autogen.sh
发现:
+ mkdir -p third_party/googletest/m4
+ autoreconf -f -i -Wall,no-obsolete
./autogen.sh: line 37: autoreconf: command not found
于是:
yum install autoconf
还是报错,于是又装了这些:
yum install automake
yum install libtool
然后 ./autogen.sh
./configure
make
make check
make install
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64