Command-line/Server Instructions
Backports are enabled by default, here's how you can check to make sure they are turned on.
Ensuring Backports are enabled
To enable the backports manually make sure the following line is in your /etc/apt/sources.list
:
deb http://archive.ubuntu.com/ubuntu release-backports main restricted universe multiverse
Replacing release
with the current distribution you are using ( precise
for 12.04 for example).
Now the next steps will depend on whether you want apt to always use packages from the backports or whether you want to only use the backports only when manually specified.
Always use the backports..
Ubuntu 11.04 and newer are automatically configured to only use the backports when manually specified. If you want to always use the backports when installing you'll need to add the following lines to /etc/apt/preferences
(the file might not exist yet; that's fine):
Package: *
Pin: release a=<release>-backports
Pin-Priority: 500
Make sure you substitute release
with your current release.
Using the backports manually..
If you only want to install packages from the backports when manually specified you'll need to add this to /etc/apt/preferences
:
Package: *
Pin: release a=<release>-backports
Pin-Priority: 100
Again substituting <release>
for your current release.
note: You will need root privileges to modify /etc/apt/preferences
.
Installing from the backports..
If the backports are configured to be used manually you will need to add /release-backports
to the end of the package name when installing a package (substituting release
for your current release).
For example, if you're using 12.10 Quantal and have configured the backports for manual install you would install amarok with this command:
sudo apt-get install amarok/quantal-backports
Source: Ubuntu Backports - Ubuntu Wiki
Best Answer
This repository should be enabled by default and is only available for 10.10 and up.
Ubuntu Desktop
In the Software Center (Applications -> Ubuntu Software Center) navigate to Edit -> Software Sources...
From there navigate to the Other Software tab and ensure the Independent sources are selected
Press close and allow the sources to reload.
Ubuntu Server
Open the APT Sources list
Locate the lines which say
Remove the hash (
#
) tag from those lines. If the hashes are not present then that source is already enabled. If those lines aren't there at all you will need to add them to the bottom of the file:Close the editor and run
This will download the package cache from the extra's location.
Reference: