Ubuntu 20.04安装Protocol Buffers 2.5.0

个人博客地址:Ubuntu 20.04安装Protocol Buffers 2.5.0 | 一张假钞的真实世界

安装过程

Protocol Buffers 2.5.0源码下载:https://github.com/protocolbuffers/protobuf/tree/v2.5.0。下载并解压。

将autogen.sh文件中以下内容:

复制代码
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

执行以下命令进行安装:

复制代码
./autogen.sh
./configure
make
make check
make install

安装问题

问题一

问题现象

执行 autogen.sh 时出现一下错误:

复制代码
configure.ac:29: error: possibly undefined macro: AC_PROG_LIBTOOL
      If 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

问题二

问题现象

安装完成后验证出现以下错误:

复制代码
$ 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

  • 创建/etc/ld.so.conf.d/libprotobuf.conf文件,并输入以下内容:

    /usr/local/lib

  • 执行命令:sudo ldconfig

相关推荐
阿里云大数据AI技术5 小时前
【跨国数仓迁移实践9】dbt‑maxcompute 在 GoTerra 迁移过程中的落地与技术贡献
大数据
的小姐姐5 小时前
RMS设备检修管理系统_HawkEye智能运维平台_璞华大数据
大数据·运维
时空自由民.6 小时前
repo 学习教程
大数据·学习·elasticsearch
刘一说6 小时前
Elasticsearch HTTPS访问错误解决指南
大数据·elasticsearch·https
华略创新7 小时前
引入外部咨询顾问,提供专业指导——制造企业大型系统项目的明智之选
大数据·制造·crm·erp系统·企业管理软件
时序数据说8 小时前
物联网时序数据管理的利器:为何IoTDB备受青睐?
大数据·数据库·物联网·时序数据库·iotdb
Justin_199 小时前
Linux防火墙firewalld
大数据·linux·运维
Lx3529 小时前
Hadoop数据处理模式:批处理与流处理结合技巧
大数据·hadoop
城管不管9 小时前
搭建分片集群
大数据·数据库
刘一说10 小时前
Elasticsearch启动失败?5步修复权限问题
大数据·elasticsearch·jenkins