How can I uninstall protobuf 3.0.0?

Viewed 77138

I used the instructions from here to install Protocol Buffer: https://github.com/google/protobuf/blob/master/src/README.md and ended up with version 3 ("protoc --version" "libprotoc 3.0.0")

However, I need a protoc version 2.

I tried to uninstall it with apt-get remove protobuf-compiler

But this is what I get and version 3 is still installed:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'protobuf-compiler' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 396 not to upgrade.

I am using Ubuntu 14.04 and "which protoc" command points at "/usr/bin/protoc"

I am looking to an alternative solution than given in Protocol Buffer: Version Change

I am not sure if I am using the correct command for uninstalling. Any suggestions?

5 Answers

I just had the same issue and the problem was in usr/local/include/. It installs its header files while you were installing protoc from the source and when you uninstall it, it does not erase its include headers. Therefore, *.pb.cc files still try to include those files. I fixed the problem by removing protobuf header in usr/local/include/ and then reinstalling libprotobuf from apt-get.

On Fedora 29 sudo dnf remove protobuf removed my previously installed sudo dnf -y install protoc 3.5.0 version.

[dzintars@fedora ~]$ protoc
bash: protoc: command not found...
Related