我想降级我的protobuf版本,以便使用gcc-4.9和matlab.所以有人可以采取好的解决方案吗? [英] 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?

查看:94
本文介绍了我想降级我的protobuf版本,以便使用gcc-4.9和matlab.所以有人可以采取好的解决方案吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

推荐答案

似乎您已经从某个二进制文件可能位于/usr/local/bin中的外部源安装了protobuf 3.0.2,而从repo在/usr/bin中有其二进制文件.试试这个:

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

只要您想重新使用protobuf 3.0.2,只需确保/usr/local/bin位于PATH环境变量的左侧即可.

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.

请注意,这可能对/usr/bin和/usr/local/bin(对于当前终端会话)中存在的其他二进制文件也具有类似的作用.

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).

对此的永久解决方案是通过运行来卸载protobuf 3.0.2

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

sudo make uninstall

protobuf 3.0.2的源文件夹中.

in the source folder of protobuf 3.0.2.

这篇关于我想降级我的protobuf版本,以便使用gcc-4.9和matlab.所以有人可以采取好的解决方案吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆