Using Checkinstall To Build Packages From Source
Checkinstall is a utility that builds a .deb, .rpm or Slackware package from a third party source code tarball. This allows you to introduce such third party software using the standard package management features of your distribution. In contrast, the conventional instructions for installing such software packages puts your package manager out of sync with the actual collection of software installed on your Linux box.
This short tutorial presumes that you're using a Debian-derived distribution such as Ubuntu, although it should work with most distributions. It also presumes that you have some prior experience of building a package from the source code.
For most users, the preferred method of adding software to a Linux system is by using a package manager. Package management is very reliable these days, and apart from anything else, it offers an advantage that Linux systems enjoy. However, what do you do when a package that you need isn't in the repository of your chosen distribution, or it is in there but it's an old version? In such cases, there is often nothing else for it but to build from source.
Building from source is a reasonably simple process, but it brings with it a few problems. For a start, you're circumventing the package manager, and this puts its internal database out of sync with the software installed on your computer. You can even end up with two versions of an application installed simultaneously which can cause all sorts of problems.
Thankfully, there is a tool called Checkinstall that is designed to sort out this mess. Checkinstall takes a compiled source code tarball and turns it into a Debian, Slackware or RPM package that you can install “officially” via the package management tools. Furthermore, you can distribute the finished package so that other people can install it without having to build from the source code. Best of all, it's very easy to use if you already know how to build packages from the source. Checkinstall is not included by default in some distributions, so you might have to search for it and install it via the package manager.
The normal process for building a package from source is begun by, having first downloaded and unpacked the source code from the maintainer's website, navigating to the the source code directory and typing:
Once the configuration process has completed, you then type:
which builds the source code, followed by:
sudo make install
which installs the package. However, the official instructions typically encourage you to circumvent the advantages of a package manager, and this is the part that causes the problem . Instead of invoking “sudo make install” type:
Checkinstall will begin the process of creating a .deb package (in the case of a Debian style system) and installing it. Before carrying out the actual build you'll be asked a series of questions. If you merely want to build a package to add to your own system, you can safely accept the default answers. However, if you intend to distribute the finished package, it's a good idea to fill in some of the fields such as your contact details and any other important notes.
It's worth noting that, as with most command line tools that install packages, you must make sure that no other package management tools are running when you run Checkinstall. If you merely want to create the .deb without carrying out the installation, use the command line switch
sudo checkinstall --install=no
Creating an Ubuntu package for Beebem, a BBC Micro emulator
I wonder if I'm the only one who thinks that Checkinstall should be more prominently featured in most distributions, perhaps with a GUI front end of some sort?
The Checkinstall website.
UK based freelance writer Michael Reed writes about technology, retro computing, geek culture and gender politics.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
|ServersCheck's Thermal Imaging Camera Sensor||May 25, 2016|
- Tips for Optimizing Linux Memory Usage
- Working with Command Arguments
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- CentOS 6.8 Released
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- Oracle vs. Google: Round 2
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide