注意: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*
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.