Could not find PROTOBUF Compiler

吃可爱长大的小学妹 提交于 2020-02-03 08:02:11

问题


I'm trying to do a CMake with Caffe, but my system cannot find protobuf compiler. I have previously installed protobuf2.7.0. Now I switched back to 2.6.1. How could I configure my CMake to recognize the protobuf2.6.1 compiler?

I have done

$ sudo apt-get install  libprotobuf-dev protobuf-compiler
$ protoc --version
libprotoc 2.6.1

But when I try to cmake Caffe, it still gives me the error

user@user-computer:~/caffe/build$ cmake -DBLAS=open ..
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   system
--   thread
--   filesystem
--   chrono
--   date_time
--   atomic
-- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)
-- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)
CMake Error at cmake/ProtoBuf.cmake:13 (message):
  Could not find PROTOBUF Compiler
Call Stack (most recent call first):
  cmake/Dependencies.cmake:43 (include)
  CMakeLists.txt:46 (include)


-- Configuring incomplete, errors occurred!
See also "/home/user/caffe/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/caffe/build/CMakeFiles/CMakeError.log".

回答1:


The following command worked for me.

 apt-get install protobuf-compiler



回答2:


I meet the same problem. I solved it by running following commands:

sudo apt-get remove protobuf-compiler
sudo apt-get install protobuf-compiler

I had tried to run just the second command, but it doesn't work.



来源:https://stackoverflow.com/questions/46698260/could-not-find-protobuf-compiler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!