Wednesday, March 18, 2015

Slackware package manager - how to install applications

Slackware is the oldest Linux still being maintained, it is light, simple, and stable.
It is not too easy to maintain, specially because most Linux users now a day (me included) are accustomed to package manager tools that take care of dependency resolution. In Slackware the user is the one who should resolve this, and install any package or library needed.
Slackware is a free and open source operating system. It was one of the earliest operating systems to be built on top of the Linux kernel and is the oldest currently being maintained. Slackware was created by Patrick Volkerding of Slackware Linux, Inc. in 1993. The current stable version is 13.1, released on May 24, 2010.
Slackware’s package management system can install, upgrade, and remove packages from local sources, but makes no attempt to track or manage dependencies, relying on the user to ensure that the system has all the supporting system libraries and programs required by the new package. If any of these are missing, there may be no indication until one attempts to use the newly installed software.
The “normal” way to install and maintain software on Slackware is using:
·         installpkg: To install new software, you should previously install the dependencies.
·         upgradepkg: To upgrade an installed package to a new version
·         removepkg: To remove an installed package you do not want.
Another good practice is to download sources and configure, compile and install by yourself, you will be warned about missing dependencies, at the compiling time.
There other tools that really help the new-to-slackware user. These are the ones that are helping me.
·         slackpkg
·         slapt-get
You may have it already installed on your Slackware, but if not you can go to slackpkg project home page, to see how to install and use it.
What I really like about this tool, is its ability to find the package you need to install
For example, if you need the glibc library, you can search for the packages that contains it:
sudo slackpkg file-search glibc
You will something like this:
Looking for glibc in package list. Please wait... DONE
The list below shows the packages that contains "glibc" file.
[ installed ] - glibc-solibs-2.11.1-i486-3
[ installed ] - glibc-zoneinfo-2.11.1-noarch-3
[ installed ] - man-pages-3.24-noarch-1
[ installed ] - glibc-2.11.1-i486-3
[ installed ] - glibc-i18n-2.11.1-i486-3
[ installed ] - glibc-profile-2.11.1-i486-3
[uninstalled] - mutt-
You can search specific packages using "slackpkg search package".
This is very handy, specially if you are compiling your own software from sources.
slapt-get is a command line utility that functions in a similar way to APT. While slapt-get does provide a framework for dependency resolution, it does not provide dependency resolution for packages included within the Slackware distribution. However, several community package sources and Slackware based distributions take advantage of this functionality
This is also a very good package manager, and works more or less likeslackpkg, you may want to read slapt-get FAQ, to better understand it.
There are some other options and package managers for Slackware, none of them as “easy” as apt-get, yum, pacman or even emerge. But that is exactly what makes slackware a good Linux distribution for some applications.

I think is a great option for servers, where you want to have full control of what is running on your server, and do not delegate that task to a package manager.