-1

I am trying to install caffe on a server where I have no root access and I get the following error

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

This error pointed me to https://github.com/BVLC/caffe/issues/4512

protobuf2.3.0 is installed on the server and I installed protobuf3 on my home directory and I added the locations to LD_LIBRARY_PATH, but if I do protoc --version it still points to 2.3.0. and which protoc says /usr/bin/protoc I'm not allowed to delete the 2.3 version.

How can I point to my other installation?

Edit: At the beginning of the error message is .build_release/src/caffe/proto/caffe.pb.h error: #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer headers. Please regenerate this file with a newer version of protoc.

TobSta
  • 766
  • 2
  • 10
  • 29
  • Please add the complete error message. The last line alone doesn't give us much hint on what's wrong with your setup. – goedson Sep 19 '16 at 11:31
  • did you append or prepend the path to protobuf3 libs to LD_LIBRARY_PATH. They need to be prepended to the environment variable, – ypx Sep 19 '16 at 13:09
  • yes, i prepend it: `export LD_LIBRARY_PATH=/protobuf3/lib:$LD_LIBRARY_PATH` – TobSta Sep 19 '16 at 15:07
  • It seems you are refusing files from your previous build with protoc 2.x. Try `make clean` to get rid of old files before trying to build. – goedson Sep 20 '16 at 00:14

1 Answers1

2

It seems you need to add the directory where your new protoc is installed to your PATH variable. Something like export PATH=/path/to/your/protobuf/installation/bin:$PATH should do it, depending on the shell you're using.

goedson
  • 643
  • 4
  • 11
  • Thank you! `protoc --version` prints libprotoc 3.0.0 now, but I still get the same error when trying to build caffe – TobSta Sep 19 '16 at 11:24