8

I'm tasked to update a package on a Ubuntu Server Trusty Tahr installation. Specifically rfc5766-turn-server which is really old on Trusty.

https://launchpad.net/ubuntu/+source/rfc5766-turn-server

As you see the latest package for Trusty is 3.2.3.1-1 while for Utopic Unicorn a newer 3.2.4.1-1 exists.

Is it possible to just update this single package using apt? This is a dedicated turn-server so downloading the source and all the build tools is not something I want to do.

12

You can simply download the .deb and install it with dpkg -i file.deb. However, this will be a one-time install and you will not get updates for this package as part of the normal apt-get update && apt-get upgrade process. If you want to get them, you will have to add the Utopic repositories to your sources.list and use /etc/apt/preferences to indicate that they should be used only for this package, with something like

Package: *
Pin: release n=trusty
Pin-Priority: 501

Package: rfc5766-turn-server
Pin: release n=utopic
Pin-Priority: 502

See man apt_preferences for details about how this works, but basically: Apt always installs the package with the highest priority; version numbers are only used as tie-breakers when several packages have the highest priority (then the one with the highest version number is installed). By default, all packages have priority 500, so if you have both the Trusty and the Utopic repositories in your sources.list, the Utopic versions will be installed since they have higher version numbers. We start by assigning priority 501 to all Trusty packages, so they will not be upgraded to Utopic since they have higher priority. Then we assign priority 502 to the package rfc5766-turn-server from Utopic so that it will be preferred over the Trusty version (we could also assign priority 501 to it of course...).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.