Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I want to downgrade my protobuf version in order to working with gcc-4.9 and matlab. so have anybody can taking a good solution?

xy@xy-desktop:/usr/bin$ sudo apt-get install libprotobuf-dev protobuf-compiler

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libprotobuf-dev is already the newest version (2.6.1-1.3).
protobuf-compiler is already the newest version (2.6.1-1.3).
0 upgraded, 0 newly installed, 0 to remove and 361 not upgraded.

xy@xy-desktop:/usr/bin$ protoc --version
libprotoc 3.0.2
like image 587
znb booker Avatar asked Oct 20 '25 08:10

znb booker


1 Answers

It seems you have installed protobuf 3.0.2 from some external source whose binary is probably in /usr/local/bin, while the protobuf 2.6.1 installed from repo has its binary in /usr/bin. Try this:

export PATH=/usr/bin:$PATH
protoc --version

Whenever you want to go back to using protobuf 3.0.2, just ensure that /usr/local/bin is at the left side in PATH environment variable.

Please note that this may also have similar effect on other binaries which are present in both /usr/bin and /usr/local/bin (for the current terminal session).

A permanent solution to this would entail uninstalling protobuf 3.0.2, by running

sudo make uninstall

in the source folder of protobuf 3.0.2.

like image 62
Faiz Akhtar Avatar answered Oct 22 '25 03:10

Faiz Akhtar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!