Install packages

From LWP-Wiki
Revision as of 13:47, 10 February 2015 by Chris (talk | contribs)
Jump to navigation Jump to search

It is possible for users to install packages from the standard repositories we provide on their own LWP's. Students (i.e. those logging in with S-numbers) are excluded from this feature, because the PCs in the computer rooms need to diverge as little as possible.

If you wish your software to be installed on all LWP's, please fill out this software request form.

We've added many extra repositories, for special packages, but they've been given a lower install priority. We've done this, so you have to deliberately install the package version you want and no accidental installs happen. You can also install anything that can be found in the Ubuntu Software Center.


Here are the most useful commands on the command line.

  • To search for the actual package name:
sudo apt-cache search <name of the program>
  • See the available versions of a package and in what repository with what priority they can be found:
sudo apt-cache policy <package>
  • Installing a package from
1. the standard Ubuntu repositories:
sudo apt-get install <package>
2. the extra repositories:
sudo apt-get install -t o=<origin> <package>
  • With the '-t' option you can provide the <origin> of the package. The origin can be found in the preferences file of the repository of the package:
cat /etc/apt/preferences.d/<repository_name>.pref

e.g. If you would like to install the latest version of Libreoffice on your system. It isn't available from the main repository, but it is available in one of the extra's with a lower (400) priority. (version numbers may differ)

sudo apt-cache policy libreoffice
[sudo] password for <you>: 
libreoffice:
  Installed: 1:3.5.7-0ubuntu5
  Candidate: 1:3.5.7-0ubuntu5
  Version table:
     1:4.2.1-0ubuntu1~trusty 0
        400 http://deb.rug.nl/ppa/mirror/ppa.launchpad.net/libreoffice/ppa/ubuntu/ precise/main amd64 Packages
 *** 1:3.5.7-0ubuntu5 0
        500 http://osmirror.rug.nl/ubuntu/ trusty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:3.5.4-0ubuntu1.1 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1:3.5.2-2ubuntu1 0
        500 http://osmirror.rug.nl/ubuntu/ trusty/main amd64 Packages

We'll have to determine the origin of the package:

cat /etc/apt/preferences.d/libreoffice.pref
# libreoffice
Explanation: : libreoffice
Package: *
Pin: release o=LP-PPA-libreoffice
Pin-Priority: 400

The "o=..." parameter is the origin, so now we can install the latest version with the addition of "-t o=LP-PPA-libreoffice" to the normal apt-get command:

sudo apt-get install -t o=LP-PPA-libreoffice libreoffice
<long list of packages and extra packages>
[y/n] y
<even longer list of stuff the system is doing>

It might ask you if you want to keep some configuration file. Usually the default (keep the config file on the system) is the best choise... unless you want to begin with a completly clean install, because of problems. When it's done, you'll have the latest version of Libreoffice installed.