This is an old revision of the document!
Table of Contents
Installing Software
Overview
There are two basic ways to install software in Slackware: install a pre-build binary package, or make your own package. If you need to compile the package from source code, making it into your own package is easy and useful. Here's how both methods work.
Installing Pre-built Binary Packages
To install a package you first need to get the package.
- Official packages can be found on the Slackware CD-ROM or the Slackware FTP/HTTP mirrors. The package browser can be found at http://packages.slackware.com/.
- Unofficial, community contributed binaries can be found at sites such as http://www.linuxpackages.net/, http://www.slacky.eu and http://slackfind.net/. Usually the file name ends with
.tgz
,.tbz
or.txz
and looks something like “mozilla-firefox-14.0-x86_64-1.txz”. Make sure you get the Slackware package built with the correct architecture and made for your version of Slackware!
To install the package you need to change to the root user. Run either the command su -
or sudo bash
and enter your root password. Now run the command
upgradepkg --install-new your-long-package-file-name
You should see a bunch of text running across your screen telling you about the package being installed, and possibly about an old package it might be replacing.
Make A Package
From Source
The recommended way to build packages from source is to use or create SlackBuild scripts.
However, there are other utilities such as src2pkg and checkinstall which automate the package creation process entirely (with a few user inputs), but these are not guaranteed to work with all possible kinds of source projects.
From third-party package formats
Binary packages from other distributions can be converted to Slackware packages by using conversion tools. Although building packages from source is always better, there are some situations which might warrant the use of these tools.
Compiling from scratch
Some users still prefer the traditional method of compiling from source directly and installing using make install
or a similar command.
The generic steps for standard GNU Autotools Makefiles are:
./configure make make install # as root
The configure script may take additional switches to enable or disable features or configure other build options.
Other build systems may involve different steps, depending on how the source project is set up. As always, it is best to read the upstream developer documentation to figure out how to compile and build a program for your system, including which dependencies to fulfill.
Sources
- Originally written by peterwwillis for the SlackDocs Wiki Project
- Additional contributions by V.Harishankar