title: protoc shared libraries error in ubuntu 16.04
body: <p>I tried to install caffe in Ubuntu 16.04 and I encountered the error when I typed <code>make all</code> in the root caffe directory.</p>
  
  <pre><code>protoc: error while loading shared libraries: libprotoc.so.9: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>I tried <code>protoc --version</code>, the error is still:</p>
  
  <pre><code>protoc: error while loading shared libraries: libprotoc.so.9: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>So I used <code>locate libprotoc.so.9</code>, and found that the libprotoc exists in </p>
  
  <pre><code>/usr/lib/x86_64-linux-gnu/libprotoc.so.9
  /usr/lib/x86_64-linux-gnu/libprotoc.so.9.0.1
  </code></pre>
  
  <p>So I used the following methods try to let system knows where is libprotoc,</p>
  
  <p>1)</p>
  
  <pre><code>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
  </code></pre>
  
  <p>2) go to <code>/etc</code> and add the path by </p>
  
  <pre><code>vim ld.so.conf 
  </code></pre>
  
  <p>Although I used <code>sudo ldconfig</code> everytime I made any change to the files, still the error exists. I also found that when I tried <code>gedit filename</code>, the similar error will show up as :</p>
  
  <pre><code>gedit: error while loading shared libraries: libmirprotobuf.so.3: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>I really don't know how to deal with this shared libraries problem. </p>
  
  <p>And idea would be helpful ! </p>
  
  <p><strong>UPDATE:</strong>
  so I remove the original protobuf by <code>sudo uninstall protobuf</code>,however a new error shows up when I use <code>make all</code> in caffe file, </p>
  
  <pre><code>.build_release/src/caffe/proto/caffe.pb.h:10:40: fatal error: google/protobuf/port_def.inc: No such file or directory
  </code></pre>
  
  <p>And <code>port_def.inc</code> actually exists at <code>~/google/protobuf/port_def.inc</code>.Seems I cannot let caffe know the path, that's the problem. </p>
  
  <p>But how to solve it ? </p>