美文网首页
ubuntu18.04 安装protobuf-c

ubuntu18.04 安装protobuf-c

作者: Mlotjve | 来源:发表于2018-11-01 14:50 被阅读0次

1 下载protobuf

https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz

2 进入下载文件的目录

tar -zxvf protobuf-2.6.1.tar.gz
cd protobuf-2.6.1/
./configure --prefix=/usr

报错:

checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/root/protobuf-2.6.1':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details

3 安装gcc 环境

apt-get install gcc

  1. 安装G++环境

app install g++

  1. ./configure --prefix=/usr

安装成功

  1. 编译
make
make check
sudo make install

如果没有make 则先安装make apt install make

相关文章

网友评论

      本文标题:ubuntu18.04 安装protobuf-c

      本文链接:https://www.haomeiwen.com/subject/umgtxqtx.html