Home Blog Page 8320

Installing software in Linux

By Jenn Vesperman

Installing software can be confusing. Make this, run that, download this, display that. At first glance, it doesn’t make sense. In reality, there are only a few techniques. These techniques are used in different ways, or called in a different order, but once you know the main techniques you can recognize them and make sense of software installation.

Packages

Most Linux distributions use package systems, which contain programs ready for installation and a record of what else those programs rely on.

When a package is installed, the installer checks whether the other files the program will need are present. Each installer handles missing files differently.

There are two major types of packages for Linux systems. .rpm, used by Red Hat Linux and distributions based on Red Hat (such as SuSE and Mandrake); and .deb, used by Debian Linux and distributions based on Debian.

Package managers can also be used to remove or upgrade software.

.rpm and rpm: To install a .rpm on a Linux system that uses rpms, first download the file then use the rpm package manager. The graphical versions are gnorpm for Gnome systems, and KPackage for KDE. If you use neither, the command line version is rpm --install (package file) .

On the command line, run rpm --install --test (package file) to determine which packages are needed by the package you’re trying to install, and any other conflicts that the new software may cause. If this shows packages that aren’t installed on your system, rpm may need to install those as well.

You can also find out which packages are required with rpm --query --requires -p (package file).

apt, deb and dpkg

deb packages are designed for Debian Linux. The apt system is the simplest way to retrieve and install packages for Debian Linux.

apt: apt is a system for installing packages. It can be used for both types of package, and is primarily used on Debian systems.

To use apt, you need to set up an apt source. On Debian systems, the debian-config program sets up the sources during the installation process. Apt sources are locations where packages and package information can be downloaded. Once you have an apt source set up, the command apt-get install (package name) will install the package for you, and also install anything the package requires.

If you do not know the package name, the command apt-cache search (keywords) will search package names, file names and package descriptions for the keywords; and present a list of matching packages.

$ apt-cache search cervisia
cervisia - KDE based CVS frontend

The command apt-get update will automatically update the source and package lists, and should be used if you want the latest version of a package.

dpkg:
The Debian package manager is another way to install .deb packages. dselect is a graphic front end to dpkg, and can be called by running the command dselect from the command line.

dpkg can be run directly from the command line, if desired.

alien:
alien will convert one sort of package to the other. It works on rpm (Red Hat), deb (Debian), slp (Stampede), pkg (Solaris) and tgz (archived and compressed) files.

The alien manual explicitly states not to use it for system-critical programs, only for applications.

Unpackaged software

If a program is not packaged, it will usually come as a compressed archive. The archive may contain source code, precompiled binaries, and/or scripts.

All of these will need to be installed before they can be run. Source code will need to be compiled. Precompiled binaries and scripts will just need to be installed into the correct locations.

Scripts need an interpreter to be installed on the system they will run on — most Linux systems will already have interpreters for the most common scripting languages. Some scripts can be interpreted by a Linux shell.

Preparing the software: Software that isn’t in a package is usually in some sort of archive. The most common archiving system is tar. Archives are then usually compressed, with one of the zip family of compression tools.

Download the archive file, and put it in its own directory in /tmp. Then cd to that directory, and run the appropriate un-archive and decompress commands. Run the last extension first, so if a file is called filename.tar.gz, you should ungzip it before you untar it.

Note: While the zip family of tools bear the same name as the Windows zip compression tools, they are only loosely related.

Tarred archives have the file extension .tar.
To untar a file, run the command:

tar -xvf (file name)

Zipped compressions have the file extension .zip.
To unzip a file, run the command:


unzip (file name)

Gzipped compressions have the file extension .gz, .Z, .z, .taz and .tgz.
To ungzip a file, run the command:


gunzip (file name)

Bzipped compressions have the file extensions .bz, .bz2, .tbz or .tbz2.
To unbzip a file, run the command:


bunzip2 (file name)

There may be other archive formats, or other things to be done before compiling or installing the software. If there is anything unusual to be done, there should be instructions on the site where you found the software, or with the downloaded file.

Compiling: Most developers provide README or INSTALL files in the program archive. These are text files that include instructions on compiling and installing the program.

Linux provides a developer’s utility called make. This utility allows the developer to provide a script called a Makefile, which, when run through make, will compile the program automatically. The Makefile can also include installation instructions.

In most cases, change to the directory containing the source code, then run the command make, followed by the command make install. There might also a configure script that needs to be run with ./configure before the make command.

Some software, usually CVS snapshots of open source code, comes without a configure script but with an autogen.sh file. If the documentation is unavailable or unclear, leave this for a more experienced user.

Binaries and scripts: As with compiled software, most developers provide files called README and INSTALL, in the program archive. These files should provide installation instructions. Many programs will have an installation script, that installs the software automatically.

The most common form of installation script uses the program make. These are usually called with the command make install.

Script interpreters: Programs that are distributed as source code, but do not require compilation, are dependent on special programs called interpreters. If the interpreter is not available on your system, the script will not run.

To fix this, install the appropriate interpreter. The most common interpreters are available as both .rpm and .deb packages.

Final Words

These are just general guidelines. If the instructions with the software tell you to do something different, trust those instructions rather than this article. If you have a package manager that you like that works for your distribution, use that.

If the software fails to install on your system and neither the instructions with the software nor this article helped, file a bug report with the maintainer of the software. Include everything they ask for, and be sure to include the distribution and version of your operating system.

Further reading

  • man and info pages for alien, apt, bzip2, dpkg, dselect, gnorpm, gzip, KPackage, rpm, tar and zip.
  • The instructions with the software you want to install.
  • The bug reporting instructions with the software you want to install.

Puget Sound Technology provides Binary Update service for NetBSD

An anonymous coward writes: Puget Sound Technology, a provider of open source training and technical
support services, today announced its Binary Update service for NetBSD.
This subscription-based service provides ready-to-use
software updates for critical security issues.
The NetBSD Project usually offers timely security fixes available via
their CVS source repository. (In the past, they also provided source
patches via FTP.) The suggested and standard method of fixing security
problems is to install the complete source code, retrieve the updated
code via CVS, build the related code, and then install the updated
binaries.

In some situations, when a fast system already has the source code and
CVS setup, the build-from-source security update may only take minutes.
But when starting from scratch (no source code), on slow systems, if a
patch isn’t available from NetBSD’s CVS, if the fix involves numerous
files or libraries, or when updating multiple computers, this process
may take several hours or days and a lot of knowledge.

(In addition, NetBSD provides maintenance releases which have the
integrated security fixes and other various improvements and new
hardware support. Puget Sound Technology’s Binary Update service is
useful for between official NetBSD releases.)

With Puget Sound Technology’s low-cost service, the users can retrieve
vulnerability lists and receive Binary Update announcements, and
registered users can retrieve new security updates.

The Binary Update software backs up current files (so changes can be
reverted) and extracts the new files. Depending on the download time
and size of a Binary Update, this process may take less than one minute.

Currently, this service is only for the i386 port of the NetBSD 1.5.2 and
1.5.3 releases. The Binary Update service for NetBSD/i386 1.6 will be
available as applicable. The Binary Updates are for the base system,
not the third-party packages. Example updates include: lpd buffer
overflow, gzip buffer overrun, off-by-one error in OpenSSH,
libc DNS resolver, and OpenSSL buffer overruns.

For more information about and to order Puget Sound Technology’s Binary
Update service for NetBSD, visit
http://www.pugetsoundtechnology.com/services/netbs d/updates/.

About Puget Sound Technology

Puget Sound Technology is a provider of open source solutions.
The Pacific Northwest company provides customized and classroom
training, maintenance and technical support services for
BSD, Linux and open source software. Puget Sound Technology’s
packaged service for NetBSD, including a 100-page “Getting Started
Guide” and an installation and rescue CD with graphical installer,
will be available starting mid-September.
More information about the company is available at
http://www.pugetsoundtechnology.com/.

The race continues: AMD versus Intel processor sales

An anonymous coward writes: “Whatisnew.com asserts AMD versus Intel processor struggles continues for system builders. Since the introduction of the AMD Athlon, ESC Technologies’ sales have slowly but steadily shifted from Intel to AMD. However, May and June customer purchases favored Intel processors. Will it continue?”

Category:

  • C/C++

“Full Tilt for Software Freedom,” a benefit for Free Software Foundation, is August 14

GNU.org has the press release: For the benefit of FSF, Affero is hosting a party and fund-raising evening on Wednesday, August 14, 2002 from 6 PM to 10 PM at Club NV at 525 Howard Street in San Francisco, CA. We invite all, including attendees of the nearby LinuxWorld Conference and Expo, to participate in this “Full Tilt for Software Freedom”, where attendees will enjoy an evening of vintage pinball gaming. Free (as in price) snacks will be provided and a cash bar will be available.

Considering TCO

InfoWorld has the column: “For the first time in recent memory, I find myself in total agreement with Microsoft CEO Steve Ballmer. According to published accounts of the Microsoft Fusion 2002 conference, Mr. Ballmer said, ‘We haven’t figured out how to be lower-priced than Linux.’

There it is. Finally, the acknowledgment from Microsoft that Linux is a lower-cost solution. But does that make Linux a better deal?”

Category:

  • Linux

Mandrake Linux 9.0 beta now, 9.0 in September

Anonymous Reader writes: “Mandrake moving up to 9.0. MozillaQuest Magazine (MozillaQuest.com) reports: The first beta of the upcoming Mandrake Linux 9.0 distribution now is available for public downloading and enjoyment. Look for the final release in September 2002. Gaël Duval, founder of Mandrake Linux, told MozillaQuest Magazine that … Mandrake is moving in the direction of full compliance with the LSB. Mandrake will not participate in United Linux. And MandrakeSoft has dropped Netscape. Duval: ‘I think it’s important for all the biggest Linux distributors to provide LSB-compliant products. Then it makes life easier for software publishers and users — and it finally gives more power to Linux to dominate the market and go mainstream.’ Check this MozillaQuest.com story for, details, links, and full story!

Category:

  • Linux

Linux Compatible Web site launched

Philipp Esselbach writes: “A new Linux website has been launched today. Linux Compatible is a compatibility website for applications, games and hardware.
There are current not many entries in the compatibility database but I expect that the list grows over the next days. Linux users are encouraged to take a few minutes and submit their compatibility results to the database.

Visit Linux Compatible,”

Category:

  • C/C++

‘Linux Love’ and more wIndependece essays

Anonymous Reader writes: “I first began experimenting with Linux in college. It was just something that I did in my spare time, nothing serious. Everyone experiments in college, right? Though I was trying new things I still didn’t want my parents or any of my friends back home to know, because everyone said it was wrong to experiment with alternative operating systems . . . At first it started off with an brief install here, an innocent tinker there. I wouldn’t have called it an affair, it was more of a flirtation. There’s nothing harm in dabbling with other operating systems, right? I wouldn’t have even thought about betraying my first love, Microsoft. But this new operating system was so lean and quick. And flexible. Boy was it flexible!”

Read all the essays
at DesktopLinux.com.

Category:

  • Open Source

LWN.net: We’re not closing

LWN.net announces it isn’t closing up shop, at least for now. It’s received $25,000 in new donations and advertising, but will need to make some changes to keep going, including subscriptions.

Category:

  • Linux

OpenSSH trojaned?

Eric Lubow tells us about this story: “OpenSSH was trojaned yesterday. There is not little authoritative information on the situation. What is known is that the original file was exchanged with a trojaned file and was discovered because it had a different MD5 checksum. The difference in the files says that it is not really a trojan because all it does is make a connection to 203.62.158.32 on port 6667. The rest of the article is available here at LinuxSecurity.com.”

Category:

  • Security