Kubuntu Saucy Packages and Repositories

From

(Redirected from Kubuntu Saucy Repositories)
Jump to: navigation, search
Kubuntu Saucy Packages and Repositories
Full page | eBook Version

Contents

Add Extra Repositories

Software packages and programs are freely available for download at multiple online sites with standardized structures, called repositories. There are repositories officially sanctioned and monitored by the Kubuntu/Ubuntu developer community, while other repositories are independently provided, without official sanction or supervision (and should be used with caution). Additional information is available from the Kubuntu Repository Guide.

Types of Repositories

  • There are four major package repository types in Kubuntu:
  • main - Supported and supervised by Canonical. This is the major part of the distribution.
  • restricted - Software not licensed under the GPL (or similar software license), but supported and supervised by Canonical.
  • universe - Software licensed under the GPL (or similar license) and supported by users.
  • multiverse - Software not licensed under the GPL (or similar license), but supported by users.
  • There are also these additional types of repositories:
  • Saucy-updates - Updates to official packages.
  • Saucy-backports - Current version software from Terrific Tiger (Saucy+1) that has been backported to Saucy Salamander.
  • Saucy-proposed - Proposed updates & changes (bleeding edge stuff).

Third party repositories

Software developers often maintain their own repositories, from which software packages can be downloaded and installed directly to your computer (if you add the repository to your list). Many of these third party repositories and software packages have never been reviewed by the (K)Ubuntu/Debian community and can present a security risk to your computer. Trojans, backdoors, and other malicious software can be present at any unregulated repository. When using repositories not endorsed by the (K)ubuntu/Debian community, make sure you have utter confidence in that site before enabling the repository and installing a software package from it.

PPA repositories

A Personal Package Archive (PPA) is a special software repository used for experimental source packages still under development. Such software has not been approved by the Debian or Ubuntu developers (but may eventually become an accepted package). Use this software at your own risk just like any other third party repository software.

Documentation about how to install software from this type of repository can be found at the PPA Installing Software Guide.

In brief, to add a repository:

sudo add-apt-repository ppa:user/ppa-name

Note: If add-apt-repository is not available on your system, then install it with the package:

sudo apt-get install python-software-properties

Add Repositories using the Package Manager

This is the preferred method.

  • K menu -> System -> Muon Package Manager -> Settings -> Configure Software Sources
  • Here you can enable the repositories for Kubuntu Software and Other Software.
  • For Other Software select Add -> enter the repository's address. It will have a format similar to:
deb http://archive.ubuntu.com/ubuntu/ saucy main restricted
deb-src http://archive.ubuntu.com/ubuntu/ saucy main restricted
  • Example: To add the Medibuntu repository, Add:
deb http://packages.medibuntu.org/ saucy free non-free
  • Update the package list found in the new repository:
-> Close -> Reload
  • Download the repository key to a folder.
  • Example: The Medibuntu key can be downloaded from
http://packages.medibuntu.org/medibuntu-key.gpg
  • Then add the key from:
  • K menu -> System -> Muon Package Manager -> Settings -> Configure Software Sources -> Authentication -> Import Key File...
  • (Alternatively, you can manually add the key from the Konsole command line terminal. See Add Repository keys.)

Manually add repositories

  • Adding a repository (such as a Launchpad ppa repository) can be accomplished from the command-line interface:
sudo apt-add-repository ppa:user/repository

where ppa:user/repository is an example of the repository you wish to add.

  • When the repository name has a format similar to the following, enclose the repository name in quotation marks:
sudo apt-add-repository "deb http://repository.example.org saucy stable"
  • To remove a repository:
sudo apt-add-repository -r ppa:user/repository
  • Refresh the packages list from the new repositories:
sudo apt-get update

Note: If add-apt-repository is not available on your system, then install it with the package:

sudo apt-get install python-software-properties

Edit the repository sources list

  • This is an optional, labor intensive method. Do this at your own risk. Modify the default Kubuntu sources.list only if you understand what you're doing. Mixing repositories can break your system. For more information see the Ubuntu Command-line Repository guide.
  • Create a backup of your current list of sources.
sudo cp -p /etc/apt/sources.list /etc/apt/sources.list_backup

Note: sudo - runs the command with root privileges. cp = copy. -p = prompt to overwrite if a file already exists.

  • Edit the list of sources:
sudo nano /etc/apt/sources.list
or using a graphical editor:
kdesudo kate /etc/apt/sources.list
  • Note: To use your local mirror you can add "xx." before archive.ubuntu.com, where xx = your country code.
Example: deb http://gb.archive.ubuntu.com/ubuntu precise main restricted universe multiverse indicates a repository for Great Britain (gb).
  • Here is a sample sources.list. At the end have been added repositories for Medibuntu and Google:
deb http://us.archive.ubuntu.com/ubuntu/ saucy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ saucy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy universe
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ saucy multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy multiverse
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ Saucy-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ Saucy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu saucy partner
deb-src http://archive.canonical.com/ubuntu saucy partner

deb http://security.ubuntu.com/ubuntu saucy-security main restricted
deb-src http://security.ubuntu.com/ubuntu saucy-security main restricted
deb http://security.ubuntu.com/ubuntu saucy-security universe
deb-src http://security.ubuntu.com/ubuntu saucy-security universe
deb http://security.ubuntu.com/ubuntu saucy-security multiverse
deb-src http://security.ubuntu.com/ubuntu saucy-security multiverse

## Medibuntu - Ubuntu 13.10 "Saucy Salamander"
## Please report any bug on https://bugs.launchpad.net/medibuntu/
deb http://packages.medibuntu.org/ saucy free non-free
deb-src http://packages.medibuntu.org/ saucy free non-free

# Google software repository
deb http://dl.google.com/linux/deb/ stable non-free
  • Refresh the packages list from the new repositories:
sudo apt-get update

Add repository keys

  • Download the gpg keys for the repositories and automatically add them to your repository keyring:
  • Example: To obtain and add the Medibuntu repository key:
wget --quiet http://packages.medibuntu.org/medibuntu-key.gpg -O - | sudo apt-key add -
  • Example: To obtain and add the Google repository key:
wget --quiet https://dl-ssl.google.com/linux/linux_signing_key.pub -O - | sudo apt-key add -

Note: wget - retrieves a file from a network location. --quiet = no output. -O - = Output downloaded item to the screen. The | (pipe symbol) is used to capture the output from the previous command and use it as an input for the piped command (i.e. apt-key, which adds it to the keyring).

  • Alternatively (and perhaps more easily), you can use apt-key directly:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEY
where KEY is the missing key code printed in apt-get output, e.g. EF4186FE247510BE.
Note: Key servers often use port 11371. Make sure your firewall allows port 11371 to be open.
  • A repository key can also be downloaded then added ("imported") using your package manager or update-manager. For example, to use the Muon Update Manager:
K menu -> System -> Muon Update Manager -> Settings -> Configure Software Sources -> Authentication -> Import Key File...

Revert packages to official release versions

Many users like to keep extra Kubuntu repositories (updates, backports, PPAs) enabled in order to receive the newest updates. Occasionally, though, this can create a situation in which one or more packages go "orphan." Once this happens, depending on how version numbers are tracked, dist-upgrade may not be able to replace the orphaned packages. For solutions used to revert packages to the official release versions, see this Kubuntu Forums thread.

Package Installation and Updates

Apt and Package Basics

Most new users will use Muon Package Manager to install packages. The instructions below are for installing packages from the command-line terminal (Konsole).

  • Install packages:
sudo apt-get install packagename
  • Example:
sudo apt-get install mpd sbackup
  • Remove packages:
sudo apt-get remove packagename
  • To remove all dependencies:
sudo apt-get autoremove
  • Example:
sudo apt-get remove mpd sbackup
  • Search for packages:
sudo apt-cache search <keywords>
  • Examples:
sudo apt-cache search Music MP3
sudo apt-cache search "Text Editor"
sudo apt-get update
  • Upgrade packages:
sudo apt-get upgrade
  • Upgrade the entire distribution (e.g. from Lucid to Maverick):
sudo apt-get dist-upgrade

Installing .deb packages

Debian (.deb) packages are the packages that are used in Ubuntu/Kubuntu. You can install any .deb package in your system. .deb files can generally be installed from your file manager (Konqueror or Dolphin) merely by clicking on them, since file associations with the default installer is already set in Kubuntu. These instructions are for those who wish to install packages from the command-line terminal (Konsole).

  • Install a downloaded Debian (Ubuntu/Kubuntu) package (.deb):
sudo dpkg -i packagename.deb
  • Remove a Debian (Ubuntu/Kubuntu) package (.deb):
sudo dpkg -r packagename
  • Reconfigure/Repair an installed Debian (Ubuntu/Kubuntu) package (.deb):
sudo dpkg-reconfigure packagename
  • Example:
sudo dpkg-reconfigure mpd

Handling (Tar/GZip) and (Tar/Bzip2) archives

(Tar/GZip) archives end in ".tar.gz" and (Tar/Bzip2) archives end in ".tar.bz2". Bzip2 is the newer, more efficient compression method. These files can generally be automatically extracted by merely clicking on them from your file manager (Konqueror or Dolphin), since file associations with the appropriate archival utilities are set by default in Kubuntu. These instructions are for those who wish to use the command line terminal (Konsole).

  • To extract:
tar xvf packagename.tar.gz

Note: tar is an application which can extract files from an archive, decompressing if necessary.

-x means extract.
-v means verbose (list what it is extracting).
-f specifies the file to use.
  • Decompressing ".gz" files
gunzip file.gz
  • Decompressing ".bz2" files
bunzip2 file.bz2
Note: You can also decompress a package first by using the command gunzip (for .gz) or bunzip2 (for .bz2), leaving the .tar file. You would then use tar to extract it.
  • To create a .gz archive:
tar cvfz packagename.tar.gz folder
  • To create a .bz2 archive:
tar cvfj packagename.tar.bz2 folder

Installing a package from source

  • Make sure you have all the necessary development tools (i.e. libraries, compilers, headers):
sudo apt-get install build-essential linux-headers-$(uname -r)
Note: "uname -r" lists the current kernel you are using
  • Extract the archive that contains the source files:
tar xvf sourcefilesarchive.tar.gz
  • Build the package using the package's script (in this case the configure script), compile the package (make), and install the compiled package into your system (make install):
cd /path/to/extracted/sourcefiles
./configure
sudo make
sudo make install
Note: typing ./ before a filename in the current folder allows the Linux shell to try and execute the file as an application even if it is not in the path (the set of folders which it searches when you type a command name). If you get a "permission denied" error, the file is not marked as being executable. To fix this:
sudo chmod +x filename
Example: In the above instructions, configure is the shell script to build the package from source. To be sure the configure script is executable:
sudo chmod +x configure
Create a .deb package from source files

If your build from source is successful, you can make a Debian (Ubuntu/Kubuntu) package (.deb) for future use:

  • Install package tools:
sudo apt-get install checkinstall
  • Rebuild package using "checkinstall":
cd /path/to/extracted/package
./configure
sudo make
sudo checkinstall
  • Keep the resulting ".deb" file for future use. It can later be installed using:
sudo dpkg -i packagename.deb

Note: These are basic instructions that may not always work. Some packages require additional dependencies and optional parameters to be specified in order to build them successfully. More info about .deb package structure can be found here.

Muon Package Manager

The Muon Package Management Suite is a collection of several package management tools, based on the QApt package management library for Debian-based systems, that includes the Muon Package Manager, the Muon Software Center (compatible with the Ubuntu Software Center), and the Muon Updater is a system update GUI. This is now the default package management system in Kubuntu.

Usage of the Muon Package Manager is somewhat similar to Synaptic Package Manager.

While "apt-get" is a fast way of installing programs/packages, you can also use Muon Package Manager (K menu -> System -> Muon Package Manager) for installing programs/packages. Most (but not all) programs/packages available with apt-get install will also be available from Muon. This is the preferred method for most desktop users. In this guide, when you see

sudo apt-get install package

you can simply search for package in Muon and install it that way.

  • K menu -> System -> Muon Package Manager
  • Search for the name of the program/package. You can also search for a word in its description.
  • Right-click on the name of the package -> "Mark for Installation". (If the program is already installed, use "Mark for Removal" or "Mark for Purge" to remove it).
  • Click Apply Changes.
  • The selected program(s) will be automatically installed (or removed), along with its dependencies.

Synaptic Package Manager

Synaptic Package Manager is the GTK-based GUI package manager for Gnome/Ubuntu. It can be used in Kubuntu without difficulty. Usage is similar to the other package managers. Install:

sudo apt-get install synaptic

Manual Updates

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install linux-headers-$(uname -r)
or
K menu -> System -> Muon Package Manager -> Check for Updates -> Edit -> Full Upgrade (or one of the other upgrade options)

Automatic Updates

K menu -> System -> Muon Package Manager -> Settings -> Configure Software Sources -> Updates -> Automatic Updates

Repair broken packages

If a package installation fails (which can cause a Package Manager to freeze or become locked), or if a package has unsatisfied dependencies causing a similar condition, then run one (or both) of the following commands from the command-line terminal:

sudo apt-get install -f
sudo dpkg --configure -a
  • If a problem occurs with MergeList (appearing as a missing "Package: header" error):
E: Encountered a section with no Package: header
E: Problem with MergeList...
E: The package lists or status file could not be parsed or opened.
then repair by recreating the package lists:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
  • If a problem occurs with a lock on the apt cache, for example:
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
then run:
sudo fuser -cuk /var/lib/dpkg/lock; sudo rm -f /var/lib/dpkg/lock
sudo fuser -cuk /var/cache/apt/archives/lock; sudo rm -f /var/cache/apt/archives/lock
Personal tools
Sponsor