Installing Debian Packages on Slackware
In a recent post, I wrote:
In a world where the first instinct of most Linux users is to run something like
apt install peek(and if that doesn’t work, to give up), the Slackware admin’s first instinct should be to attempt to use SlackBuilds.org or sbopkg, and if that fails, take a shot at compiling it yourself. This kind of approach is the essence of what makes open source software great, and compiling things yourself on Slackware is usually simpler than you think.
Sometimes, though, you want to use a piece of popular closed-source software — something where compiling it yourself is not an option. Very often you’ll find that this type of software distributed as a standalone Debian (
*.deb) package or a standalone Red Hat (
*.rpm) package. Given a choice between
*.rpm, I prefer to go with the
*.deb option, purely out of personal preference.
Google Chrome is a good example of this type of use case. It is closed source. There is no SlackBuild available for it. Google makes it available only as a
What is a poor Slackware admin to do? deb2tgz to the rescue.
deb2tgz is a simple shell script that does it’s best to deconstruct a Debian package and reconstruct it as a Slackware package that you can you with
installpkg. It is available on SlackBuilds.org, which means we can use
sbopkg to install it, if we’re feeling lazy. For more of an explanation, see Build & Install Slackware Packages Automatically.
I’m feeling lazy. How do I install Google Chrome?
- Install sbopkg.
sbopkg -B -i deb2tgz
- Download the “64 bit .deb (For Debian/Ubuntu)” Google Chrome package.
sudo /sbin/installpkg google-chrome-stable_current_amd64.txz
What About Chromium?
Of course, if you’re a fan of Google Chrome, you could opt to go with Chromium instead of Chrome itself. Eric Hameleers developed a SlackBuild for Chromium, which Google lists as an “unofficial package”.
Note that the SlackBuild for Chromium does not live on SlackBuilds.org, but rather, it lives directly on http://www.slackware.com/. The same principals on how you use that SlackBuild still apply — it’s as if you were building a SlackBuild from SlackBuilds.org — however
sbopkg will be unaware that this particular SlackBuild exists. (See Build & Install Slackware Packages Automatically for more.)
I don’t bother with Chromium, but it’s good to know it’s out there as an option.
What About RedHat Packages?
As a matter of personal preference, I try to avoid working with
*.rpm packages on Slackware. I don’t have a good reason for it, though. It’s just my own preference.
If you do happen to come across a scenario where you have a standalone
*.rpm as your only choice, I have used alien with some success in the past. Also, Slackware appears ship with a utility called
rpm2tgz, which it seems to have similar functionality as
This approach of using
deb2tgz to convert a
*.deb to a Slackware package, and then using
installpkg to install it should be used as a last resort. I always try to:
- Find a SlackBuild, or if that fails…
- Compile from source.
Slackware has no mechanism for dependency resolution or dependency management. So using
deb2tgz is much closer to using
dpkg -i *.deb and is not at all like using
apt install *.deb on a Debian-based Linux distribution. Whether you’re on Slackware using
installpkg or you’re on Debian using
dpkg -i, you are responsible for making sure that you’ve installed whatever dependencies that are needed by the
*.deb that you’re working with.