Command ‘[‘make‘, ‘-j12‘, ‘-l12‘]‘ returned non-zero exit

Failed to process package 'cartographer': Command '['make', '-j12', '-l12']' returned non-zero exit status 2. Reproduce this error by running: ==> cd 

这个报错是在安装cartographer过程中遇到的,原因是protoc版本不对,解决方案是把ros自带的protoc卸载,重新安装

$ VERSION="v3.4.1"
$ git clone protocolbuffers/protobuf
$ cd protobuf
$ git checkout tags/${VERSION}
$ mkdir build
$ cd build
$ cmake -G Ninja \
    -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
    -DCMAKE_BUILD_TYPE=Release \
    -Dprotobuf_BUILD_TESTS=OFF \
    ../cmake
$ ninja
$ sudo ninja install

你可能感兴趣的:(嵌入式硬件)