背景:安裝cartogapher 0.3.0版本時候,(注意不是在catkin_ws安裝cartographer_ros時)
在cd cartogapher, mkdir build, cd build, cmake .. , make後遇到Unrecognized syntax identifier "proto3". This parser only recognizes "proto2"。
檢查protobuf版本: $ protoc --version 顯示的是2.6.0版本。
解決辦法:
$ which protoc 找到上個版本的執行文件protoc地址然後到那裏用 sudo rm -rf protoc
到GitHub下載Protobuf 3.5.0
$ cd Protobuf
$ git submodule update --init --recursive
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig
解釋或者詳細內容請參考官方文檔點擊打開鏈接