Slackware Linux Installation Methods
As any reader of this blog will know, I am a big fan of installing from source. My OS of choice, Slackware, makes this very easy and doesn’t break anything if you do this. I am, though, well aware that this isn’t for everyone – in fact, I break my own rule if it’s convenient.
Slackware packages end in
.tgz, which can be confusing since that is also the way that normal tar balls can end. The usual way to install these is to type (as root)
installpkg <packagename>.tgz and let the dialogue run. This then expands the archived install files into the correct places on your system. Removing or upgrading packages is equally as easy, simply exchange the
upgradepkg. This method is inbuilt to Slackware and is the most basic way of installing Slackware packages. You could also use
pkgtool which gives an ncurses frontend to a number of Slackware commands.
If you like automated downloads, you could use Swaret, Slapt-Get or Slackpkg, each of which will download the install files to your system and install them for you. These three methods are very much automated, though, and this can mean that things will break and you won’t immediately know why. Use them at your own risk, though I have only ever broken my system through my own stupidity.
Building your own packages is pretty much the best way to go. There will be no dependency checking, which could be a downside, but on the other hand you know what is in the package because you put it there. There are 3 basic ways to do this which require more or less technical ability. Slackbuilds.org is a site which is a mix of a how to and downloads. Slackbuilds are created in clean environments and are available either as a plain package download or as a set of scripts for you to run to create your own. Rworkman and Alien Bob are both active there and have been known to be extremely helpful over on the official Slackware forum.
Checkinstall substitutes itself for the
make install step in a normal source build. It creates a Slackware package as the final step which can then be installed using
installpkg as normal. The downside of this method is that it creates an extra step in the install process. The last update on the homepage is from August 2007, this could mean that no changes have been required or that the project is discontinued – I don’t know and don’t wish to speculate further!
Finally, src2pkg is created and maintained by Gilbert Ashley, who posts on LQ as Gnashley. Gnashley posts updates to the program on LQ and is available to answer questions and give support on the tool (as well as anything else Slack and Linux related). This tool, to me, is the easiest to use. All you need to do, once you’ve installed it, is run
src2pkg <packagename.tar.gz/bz> and let it do it’s thing. At the end of the run you are presented with a
.tgz file in your
/usr/doc/src2pkg-x.x has more information on the tool and ways you can use it.
Now to answer the question that has probably been on your mind: why do this at all since Slackware is so good at using source installs? Good question. Well, for starters, Slackware tends to have relatively very few 3rd party applications prepackaged and sometimes it is far more convenient to not install from source. Additionally, you may have a core of apps that you want to install immediately after you install Slackware and this makes life easier for you. Alternatively, you may want to enable someone else to install an app and this will make it easier.
Please note, none of the above 3 methods have any dependency checking. You will still need to make sure you have all that you need before installing.Â Aside from that, though, installation of 3rd party programs is that bit easier.
Posted on 20 January, 2008, in Computer Stuff, How To, Open Source and tagged build, checkinstall, How To, install, packages, pkgtool, slackbuilds, slackpkg, slackware, slapt-get, source, src2pkg, swaret. Bookmark the permalink. 23 Comments.