protoc

该博客详细介绍了如何在系统中卸载旧版protobuf并安装protobuf 3.0.0,以满足gazebo9.0的依赖。过程中提到了可能出现的问题及解决方法,包括下载gmock的替代源,以及在编译安装过程中的注意事项。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

注意:gazebo9.0依赖3.0.0版本
查看原版本

protoc --version

卸载旧版本

sudo apt-get remove libprotobuf-dev
sudo apt-get remove protobuf-compiler
sudo apt-get remove python-protobuf
sudo rm -rf /usr/local/bin/protoc
sudo rm -rf /usr/bin/protoc
sudo rm -rf /usr/local/include/google
sudo rm -rf /usr/local/include/protobuf*
sudo rm -rf /usr/include/google
sudo rm -rf /usr/include/protobuf*

安装protoc3.0.0

sudo apt-get install autoconf automake libtool curl make g++ unzip
./autogen.sh
##	1. 其中gmock可能下载不下来,使用以下链接下载解压后更名为gmock放到protoc文件夹下:
##		https://github.com/paulsapps/gmock-1.7.0
##		google下的gmock融进了gtest中,原来的gmock1.7.0内容没上面这个全,不要用它,否则会出现以下错误:
##			aclocal: error: configure.ac:1: file 'gtest/m4/acx_pthread.m4' does not exist
##		
./configure  #--prefix=/usr 加了路径设定后,在编译autoware时,citysim失败
make
make check
##	If "make check" fails, you can still install, 
##	but it is likely that some features of this library will not work correctly on your system. 
##	Proceed at your own risk.
sudo make install
sudo ldconfig # refresh shared library cache.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值