Updating Your System with apt


Updating Your System with apt

In addition to the RPM system, the APT packaging system developed for the Debian Linux distribution is the other most popular Linux install and update tool. APT's ease of use rates highly. Using APT to install most packages from the command line involves typing apt-get install <package> and APT does the rest.

Developers for the Brazilian Linux distribution Conectiva first created apt4rpm to bring the benefits of APT to RPM-based distributions. Richard Bos further adapted the program to SUSE's eccentricities. APT is not yet included in the official SUSE distribution, but is readily available from the APT for SUSE website, http://linux01.gwdg.de/apt4rpm. Many APT repositories have also been created to make using APT to download and install new software that much easier.

APT works a lot like YOU. Both applications require the SuperUser to run them; each application accesses the same RPM database when they start up to determine what application packages are installed on your system. To find new versions of current applications, and completely new packages, YaST and APT seek out designated remote servers, but YaST has a list of Novell/SUSE-owned servers that are known to mirror the existing SUSE Linux distribution. APT uses a special server-list file, /etc/apt/sources.list, to access file repositories. APT repositories include mirrors of the SUSE Linux distribution and other sites hosting SUSE-compatible RPMs. With the separate apt4rpm utility, you can even host your own APT repository.

A broader range of packages appear in APT repositories than on the official SUSE servers, and updated versions of many popular applications (web browsers, desktop environments, The GIMP, and the like) appear much faster on the APT repositories than on the SUSE servers. The downside of this speed is that SUSE doesn't put an updated package on the YOU server until it has been tested and functions well under SUSE Linux. It doesn't happen often, but you can run into trouble using new applications installed with APT, although no more trouble than you would experience downloading an RPM from another website yourself and installing it.

To download and install APT, go to the APT for SUSE site and scroll to the Software Installation section. Click the link for your SUSE version and architecture (9.2 for x86 PCs, 9.2-x86_64 for 64-bit processors). Download both the apt and apt-libs packages; then run the YaST Software Management module to install the two packages.

Before you can use APT, you need a sources.list text file to point to SUSE APT repositories. You can find a good default file at the APT for SUSE site in the Advanced Package Tool Configuration section. As before, choose the link for your version and architecture.

Caution

If you have a 64-bit processor, resist the temptation to add 32-bit apt repositories to your sources.list file. You may discover that there's a "new" 32-bit update for one of your 64-bit packages, and apt will cheerfully download the package and then announce it can't install the new package because the filenames are different.


Save the text file to your home directory, edit the file to your liking, and then copy it as the SuperUser to /etc/apt/sources.list.

Caution

Many of the repositories included in the sample sources.list file link to experimental packages that may make your system relatively unstable. If you just want to use apt to install stable packages, comment out these sections: kernal-of-the-day kraxel suse-people suse-projects. You may also want to comment out the suser-<name> sections, as well. If you want to keep up with apt upgrades, however, include suser-rbos.


When you have your sources.list file installed, you can run APT. Connect to the Internet and open a shell as the SuperUser. From the shell, gather the list of current files at the repositories by typing the following:

apt-get update

The first time you run this, it may take a little while, especially if you have a modem connection.

Note

Always run update before performing any other operations in apt. New and updated packages can appear in a repository at any time, and any given package may supply a dependency for the package you're using apt to get. Synaptic will do this automatically when you open it (if you haven't updated in the previous 48 hours).


When the repository update is completed, you can install (or update) any package in the repository. One package you might like to start with is the fine GUI front-end for APT, called Synaptic. Type the following:

apt-get install synaptic

After it is installed, Synaptic adds itself to both the KDE and GNOME System Configuration menus, so you can launch it from there. After prompting you for the SuperUser password, Synaptic will display a YaST-like Search screen, but you might prefer to browse through the list of available updates. In the lower-left corner are four package views, including the Search view you're seeing now. The Sections view corresponds to YaST's sections, and you can see both installed and available packages here. The Status view groups packages by whether they are installed, upgradable, or not installed. Click Status to display this view (see Figure 21.12).

Figure 21.12. Synaptic makes it easy to manage application packages. Installed packages with available updates have the fill-in check box with a star in the corner.


In the smaller left pane, you'll see five or six status categories. To see all packages with available updates, click Installed (upgradable). Notice that the check box to the left of each package is filled in with a yellow star in the upper-right corner. Click any package to see a description in the right bottom pane. Right-click and choose Mark for Upgrade from the context menu. If you want to upgrade everything on this list, click Mark All Upgrades from the toolbar. As with RPM, Synaptic (and APT as well) may add and remove packages to resolve dependency issues and will tell you before you commit to the changes.

Caution

Always check to see that APT is not removing critical packages without replacing them, lest you find yourself unable to boot later. And always back up your system and other critical files like the kernel, the bootloader, your desktop environment, databases, and the like before upgrading major packages.


Before committing to any new update, click the Custom view button, and then click Marked Changes to see the list of packages you are updating, installing, or removing. When you're ready to run APT, click Apply from the toolbar. APT will download all the marked packages and then install them one by one. You will see a progress bar and be notified of any problems. To get more information about the installation process while it is happening, go to Settings, Preferences, and check the Apply Changes in a Terminal Window box.



SUSE Linux 10 Unleashed
SUSE Linux 10.0 Unleashed
ISBN: 0672327260
EAN: 2147483647
Year: 2003
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net