1

我正在尝试按照http://caffe.berkeleyvision.org/installation.html#prerequisites上的说明构建 caffe 编译时出现以下错误:(我使用 Fedora 22)

$make all
CXX src/caffe/data_transformer.cpp
In file included from ./include/caffe/blob.hpp:8:0,
                 from ./include/caffe/data_transformer.hpp:6,
                 from src/caffe/data_transformer.cpp:6:
./include/caffe/common.hpp:5:27: fatal error: gflags/gflags.h: No such file or directory
compilation terminated.
Makefile:516: recipe for target '.build_release/src/caffe/data_transformer.o' failed
make: *** [.build_release/src/caffe/data_transformer.o] Error 1

我做错了什么?

4

2 回答 2

2

您必须安装缺少的依赖项(gflags)。

Fedora/RHEL/CentOS:sudo yum install gflags-devel

Ubuntu:sudo apt-get install libgflags-dev

还有其他依赖项的说明:

Fedora/RHEL/CentOS:http ://caffe.berkeleyvision.org/install_yum.html

Ubuntu:http ://caffe.berkeleyvision.org/install_apt.html

于 2016-12-24T12:18:33.797 回答
0

安装缺少的 gflag 依赖项

wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
make 
sudo make install
于 2016-05-20T20:23:21.250 回答