Create Ubuntu DEB Package from source code (.tar.gz, .tgz)

Create Ubuntu DEB Package

In this tutorial, we will show you how to create an Ubuntu DEB Package. Occasionally, we are dealing with software installation from source code by running configure, make, and make install. When we do it that way, we can not reverse the process (uninstall) it. To overcome that issue, we can build the source code into a DEB Package.

DEB, Debian packages are standard Unix archives that include two tar archives optionally compressed with gzip (zlib), Bzip2, lzma, or xz (lzma2): one archive holds the control information and another contains the program data. (Source: Wikipedia)

Create Ubuntu DEB Package from source code

Step 1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.

Step 2. Create Ubuntu DEB Package.

  • DEB builder dependencies

To start building deb package, we must install several dependencies:

For this tutorial, I will show you how to build deb package of Dante Socks Server source code. The file can be obtained here: http://www.inet.no/dante/files/dante-1.3.2.tar.gz

  • SSH Command list to build DEB Package

The following are command list to build Dante DEB package from source code:

The last command “checkinstall” will have some response which you need to input. Once completed it will produce DEB file: “dante_1.3.2-1_amd64.deb”

  • Install DEB Package

To install this package we can use the standard command:

All done now…

But, if somehow you want to uninstall it, you can do it easily using this command:

Congratulations! You have successfully created an Ubuntu deb package. Thanks for using this tutorial to create deb package on your Ubuntu 20.04 LTS (Focal Fossa). For additional help or useful information, we recommend you to check the official Ubuntu website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

Save

Tags: