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?

浪尽此生 提交于 2019-12-21 21:15:49

问题


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

回答1:


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.



来源:https://stackoverflow.com/questions/45895931/i-want-to-downgrade-my-protobuf-version-in-order-to-working-with-gcc-4-9-and-mat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!