Create deb file from source using checkinstall on ubuntu

Many software applications for linux are available in the form of source code which needs to be compiled. The general process to compile such software is by running the configure, make and make install commands. After the install process the files get installed in the system directories and the software can be run from the shortcuts or terminal command.

However there might be no option to uninstall the application. If it were installed from a deb file as a package then the package manager would keep track of the files and can un install them later. Therefore it is a good idea to create a deb package from the source first and then install from the deb file. The installed package would be visible in synaptic package manager too and can be uninstalled from there as well.

There is a small utility called checkinstall that can very easily create deb files from compiled source and create deb packages.

To install checkinstall on ubuntu run the following at the terminal

sudo apt-get install checkinstall

Creating deb from source

Now lets say you have an application that is in the form of source and needs to be compiled. Then follow these steps

1. Extract the source of the application in a folder.
2. Run : ./configure
3. Run : make
4. Run : sudo checkinstall

Note that in the 4th step we did not do a make install. Instead we run checkinstall. checkinstall will ask for some information most of which you can skip except the version of the package being created.

Once finished a .deb file would be created which can be used to install the package by simple double clicking.






Last Updated On : 27th June 2009

Subscribe to get updates delivered to your inbox

Leave a comment