当前位置 : 主页 > 大数据 > 区块链 >

cmake – 找不到PROTOBUF编译器

来源:互联网 收集:自由互联 发布时间:2021-06-22
我正在尝试用Caffe做一个CMake,但我的系统找不到protobuf编译器.我以前安装了protobuf2.7.0.现在我切换回2.6.1.如何配置我的CMake以识别protobuf2.6.1编译器? 我已经做好了 $sudo apt-get install libpr
我正在尝试用Caffe做一个CMake,但我的系统找不到protobuf编译器.我以前安装了protobuf2.7.0.现在我切换回2.6.1.如何配置我的CMake以识别protobuf2.6.1编译器?

我已经做好了

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

但是当我尝试cofke Caffe时,它仍然给我错误

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".
以下命令对我有用.

apt-get install protobuf-compiler
网友评论