如何解决“make:protoc:找不到命令”

问题描述 投票:0回答:2

我正在 CentOS 系统上安装 Caffe,但我没有管理权限。当我尝试编译时,我遇到以下消息:

PROTOC src/caffe/proto/caffe.proto
make: protoc: Command not found
make: *** [.build_release/src/caffe/proto/caffe.pb.cc] Error 127

到目前为止我所做的如下:

cd
git clone https://github.com/BVLC/caffe.git
cd caffe
cp Makefile.config.example Makefile.config
# Uncomment CPU_ONLY := 1.
# Include the following lines:
# INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
# LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial
pico Makefile.config
virtualenv caffe
source caffe/bin/activate
pip install protobuf
pip install scikit-image
make all

我该如何解决这个错误?

centos makefile protocol-buffers caffe
2个回答
2
投票

由于您缺乏管理权限,您可以

  • 要求您的管理员安装 protobufprotobuf-compiler 软件包。
  • 自行编译并将二进制文件安装在您的
    ~/bin
    目录中。

对于后者,此页面(在 CentOS 6 (linux) 上安装 google protocol buffers (protoc, protobuf))暗示它可能就像在配置脚本上使用

--prefix=$HOME
选项一样简单。


0
投票

在 Ubuntu 上,如果您有管理权限,您可以这样做

sudo apt-get install protobuf-compiler-grpc
© www.soinside.com 2019 - 2024. All rights reserved.