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

相关推荐
大大大大晴天1 天前
Hudi技术内幕:RecordPayload到RecordMerger
大数据
SelectDB2 天前
秒级弹性、最高降本 70%:SelectDB Serverless 如何重塑云数仓资源效率
大数据·后端·云原生
WhoAmI2 天前
MapReduce框架原理解析一:InputFormat
大数据·hadoop
WhoAmI2 天前
MapReduce框架原理解析三:OutputFormat
大数据·hadoop
WhoAmI2 天前
MapReduce框架原理解析二:Shuffle
大数据·hadoop
大大大大晴天3 天前
Hudi技术内幕:Key Generation原理与实践
大数据
得物技术6 天前
从埋点需求到规则资产:Hermes Agent 重构得物数仓工作流
大数据·llm·ai编程
久美子6 天前
AI驱动数仓建设的Harness工程实践——本体建模、知识分层与上下文工程
大数据
大树887 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai
大志哥1237 天前
ES和Logstash日志链路系统上线后遭遇切片爆炸(解决)
大数据·elasticsearch