1

I am using Travis-CI which uses an Ubuntu 14.04 Trusty VM to run a script. In order to run correctly the script requires the package protobuf-compiler version 3+ and the corresponding libprotobuf-dev package to be installed. Unfortunately doing the obvious apt-get install protobuf-compiler libprotobuf-dev gives me version 2.5 which is too old to compile the script.

Fortunately there is a PPA that provides version 3.4 for Trusty. I used add-apt-repository ppa:maarten-fonville/protobuf to add the PPA with the appropriate apt-get update but I still got the old version from archive.ubuntu.com, not the PPA version.

I tried giving the PPA a higher priority using this /etc/apt/preferences file as described here but I still got version 2.5.

There is a log of my script with the commands used. Line 506 adds the PPA, line 615 copies the preferences file, line 617 makes the apt update and line 719 installs the (incorrect) packages. Unfolding line 7 shows various system information.

How do I install protobuf-compiler version 3+ on Ubuntu Trusty?

nwp
  • 111
  • 2
  • 1
    davidbaumann mentioned that protobuf-compiler was available here. – Chai T. Rex Jan 25 '18 at 22:38
  • @ChaiT.Rex How do I use that? Do I wget the .dep and then dpkg -i it? I though add-apt-repository ppa:maarten-fonville/protobuf would essentially make those .dep files available to apt which then handles the rest. – nwp Jan 25 '18 at 22:44
  • 1
    I'm not sure why that PPA doesn't work on 14.04. It works here on 16.04. I think that you just install it with sudo apt-get install ./whatever.deb. – Chai T. Rex Jan 25 '18 at 22:52
  • This page suggests the package for trusty failed to build, so it makes some sense that it works on 16.04 and fails on 14.04. – nwp Jan 26 '18 at 09:16
  • 3
    The package provider updated the package to build in trusty, so the PPA works now without any preference hackery. – nwp Jan 27 '18 at 19:38

1 Answers1

0

The package is available from the mentioned PPA as of yesterday (1/27/18) from http://ppa.launchpad.net/maarten-fonville/protobuf/ubuntu/pool/main/p/protobuf/ for both the 64-bit and 32-bit versions of trusty. I'm not sure why protobuf-compiler doesn't show as being available on the launchpad page.

However sudo apt install protobuf-compiler will install it and it's dependencies from the PPA. I believe the aforementioned dependencies specifically libprotobuf15 and libprotoc15 are the reason why it wouldn't install standalone with dpkg -i if downloaded directly from http://ppa.launchpad.net/maarten-fonville/protobuf/ubuntu/pool/main/p/protobuf/protobuf-compiler_3.5.1.1-0~maarten0+trusty0_amd64.deb

Sources:

Testing

@nwp comment here

Elder Geek
  • 36,023
  • 25
  • 98
  • 183