4

以前はcaffeとFast-RCNNをインストールしていましたので、必要なライブラリと依存関係がすべて必要です。caffe:protobufバージョンでエラーが発生しました

Caffeを使用する別のリポジトリ(https://github.com/ronghanghu/natural-language-object-retrieval)用にもう一度インストールする必要があります。

私は

make all 

を実行すると、それは私に次のエラーを与える:

CXX .build_release/src/caffe/proto/caffe.pb.cc 
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0: 
.build_release/src/caffe/proto/caffe.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is 
#error This file was generated by a newer version of protoc which is 
^ 
.build_release/src/caffe/proto/caffe.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update 
#error incompatible with your Protocol Buffer headers. Please update 
^ 
.build_release/src/caffe/proto/caffe.pb.h:14:2: error: #error your headers. 
#error your headers. 
^ 
In file included from .build_release/src/caffe/proto/caffe.pb.cc:5:0: 
.build_release/src/caffe/proto/caffe.pb.h:26:55: fatal error: google/protobuf/generated_enum_reflection.h: No such file or directory 
#include <google/protobuf/generated_enum_reflection.h> 

compilation terminated. 
make: *** [.build_release/src/caffe/proto/caffe.pb.o] Error 1 

私は多分いるProtobufが更新されたと思った、と

を返し

protoc --version 

を試してみました

libprotoc 2.5.0 

protobufの新しいバージョンがリリースされたようです(2.6以降)。

だから私の質問は次のようになります。

1)それを更新するための簡単な方法はありますか?

2)もし私がそれを更新すれば、以前インストールしたcaffeとfast-rcnnに影響しますか?これは古いバージョンのprotobufに依存しますか?

答えて

3

あなたの問題は、あなたのインクルードパスに複数のバージョンのprotobufがあることが疑わしいです。最新のものではなく古いバージョンからヘッダーを取得している可能性があります。私は、最新のcaffe(現時点ではgit master)が、ubuntu 14.04LTSにあるlibprotobuf-dev-2.5.0-9ubuntu1に対してきちんとコンパイルすることを確認できます。

+4

複数のバージョンの問題をどのように処理できますか? – ytrewq

+0

複数のバージョンとヘッダーに問題があった場合、そこに問題がありましたか? – AruniRC

+0

私も解決策に興味があります。 (申し訳ありませんが、私はこれがスパムではないことを願っています) 例えばにあるprotobufの別のバージョンにリンクするにはどうすればいいですか?/usr/local? – MUmla

0

私はこれを私のコンピュータで解決しましたが、おそらくそれはあなたを助けることができます。私の環境はUbuntu16.04で、Caffeをインストールする前にPython2.7用のAnacondaをインストールしました。私はlibprotobuf-devをインストールするためにcondaを使いました。これはcaffeの 'sudo apt-get install libprotobuf-dev'コマンドと衝突し、 'apt-get'コマンドとcondaは別のコンピュータにインストールされます。 'locate protobuf'、私はlibprotobufのAnacondaのバージョンを削除し、問題は再び発生しません。あなたがカフェをインストールする前に、tensorflowインストールすると

conda uninstall libprotobuf 

は、この問題もあるためlibprotobuf競合のため、発生します。