Makefile:589: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed

4704 단어 caffe
오늘 caffe를 설치할 때 컴파일할 때 약간의 문제가 발생했습니다. 오류 정보는 다음과 같습니다.
.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^
.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.
  ^
Makefile:582: recipe for target '.build_release/src/caffe/syncedmem.o' failed
make: *** [.build_release/src/caffe/syncedmem.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from ./include/caffe/util/cudnn.hpp:8:0,
                 from ./include/caffe/util/device_alternate.hpp:40,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from src/caffe/layers/rnn_layer.cpp:4:
.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^
.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.
  ^
Makefile:582: recipe for target '.build_release/src/caffe/layers/rnn_layer.o' failed
make: *** [.build_release/src/caffe/layers/rnn_layer.o] Error 1
In file included from ./include/caffe/util/cudnn.hpp:8:0,
                 from ./include/caffe/util/device_alternate.hpp:40,
                 from ./include/caffe/common.hpp:19,
                 from ./include/caffe/blob.hpp:8,
                 from ./include/caffe/layers/exp_layer.hpp:6,
                 from src/caffe/layers/exp_layer.cpp:3:
.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^
.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.
  ^
Makefile:582: recipe for target '.build_release/src/caffe/layers/exp_layer.o' failed
make: *** [.build_release/src/caffe/layers/exp_layer.o] Error 1
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0:
.build_release/src/caffe/proto/caffe.pb.h:17:2: error: #error This file was generated by an older version of protoc which is
 #error This file was generated by an older version of protoc which is
  ^
.build_release/src/caffe/proto/caffe.pb.h:18:2: error: #error incompatible with your Protocol Buffer headers. Please
 #error incompatible with your Protocol Buffer headers.  Please
  ^
.build_release/src/caffe/proto/caffe.pb.h:19:2: error: #error regenerate this file with a newer version of protoc.
 #error regenerate this file with a newer version of protoc.
  ^
Makefile:589: recipe for target '.build_release/src/caffe/proto/caffe.pb.o' failed
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1

caffe 디렉토리에서 다음 명령을 입력합니다.
make all -j8

프로토타입에 문제가 생긴 것 같아서 제가 하나 컴파일했습니다.
https://github.com/google/protobuf/releases?after=v3.4.0rc1
먼저 도구를 설치합니다.
sudo apt-get install autoconf automake libtool
sudo apt-get install libffi-dev
sudo apt-get install curl

그리고 3.1 버전을 다운로드한 다음 압축을 풀고 실행합니다.
tar -xvf protobuf-3.1.0.tar.gz
./autogen.sh 
./configure  --prefix=/usr/local/protobuf
make
make check
sudo make install

그리고 환경 변수를 추가합니다. vim/etc/profile:
export PATH=$PATH:/usr/local/protobuf/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/protobuf/lib

적용:
source /etc/profile
그리고 됐어요.

참고 문헌


[1].caffe build problem.https://github.com/BVLC/caffe/issues/3671
[2].protobuf 3.1.0 설치 예시 및 사용 설명.http://blog.csdn.net/mircosheng/article/details/70141704
[3].autoreconf: not found.http://blog.csdn.net/x356982611/article/details/70856470

좋은 웹페이지 즐겨찾기