做網(wǎng)站只有域名關(guān)鍵詞搜索量排名
個人博客地址:Ubuntu 20.04安裝Protocol Buffers 2.5.0 | 一張假鈔的真實(shí)世界
安裝過程
Protocol Buffers 2.5.0源碼下載:https://github.com/protocolbuffers/protobuf/tree/v2.5.0。下載并解壓。
將autogen.sh文件中以下內(nèi)容:
curl http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2 | tar jx
mv gtest-1.5.0 gtest
替換為:
wget https://github.com/google/googletest/archive/release-1.5.0.tar.gz
tar xzvf release-1.5.0.tar.gz
mv googletest-release-1.5.0 gtest
執(zhí)行以下命令進(jìn)行安裝:
./autogen.sh
./configure
make
make check
make install
安裝問題
問題一
問題現(xiàn)象
執(zhí)行 autogen.sh 時出現(xiàn)一下錯誤:
configure.ac:29: error: possibly undefined macro: AC_PROG_LIBTOOLIf this token and others are legitimate, please use m4_pattern_allow.See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
問題解決
安裝 libtool:
sudo apt-get install libtool
問題二
問題現(xiàn)象
安裝完成后驗(yàn)證出現(xiàn)以下錯誤:
$ protoc --version
protoc: error while loading shared libraries: libprotoc.so.8: cannot open shared object file: No such file or directory
問題解決
- 使用find命令找到libprotoc.so.8文件位置。
$ cd /usr/local/
$ find . -name libprotoc.so.8
./lib/libprotoc.so.8
- 創(chuàng)建
/etc/ld.so.conf.d/libprotobuf.conf
文件,并輸入以下內(nèi)容:
/usr/local/lib
- 執(zhí)行命令:
sudo ldconfig