They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
nolarut
Score: 27
votes: 27
Format: Article

 How To Create A .deb Package From Source & Install It Automatically


I've found this method to work in most but NOT all cases, as sometimes additional depencies are required in order to build the package.

STEP 1:

The required packages are:

build-essential
automake
autoconf
libtool
pkg-config
libcurl4-openssl-dev
intltool
libxml2-dev
libgtk2.0-dev
libnotify-dev
libglib2.0-dev
libevent-dev
checkinstall

Or simply run the following command:

$ sudo apt-get install build-essential automake autoconf libtool pkg-config libcurl4-openssl-dev intltool libxml2-dev libgtk2.0-dev libnotify-dev libglib2.0-dev libevent-dev checkinstall
 

STEP 2:

Now to make the package:

The source tarball "transmission-1.76.tar.bz2" is used in this example (sub the .bz2 tarball of the source code for the app you are working on for this one)

$ tar xvjf transmission-1.76.tar.bz2 (alt:or you can extract the data from the tarball using the archive manager the right-click menu)

$ cd transmission-1.76 (alt: or you can highlight the newly created folder and from the right click menu choose "open terminal here")

$ ./configure && make && sudo checkinstall

This will create a .deb package for you and automatically install it on your system, which can then be easily removable via Synaptic (look in the local section), or via the Software Manager or by:

$ sudo dpkg -r

Then you can remove the source .tar.gz from your computer.

STEP 3:

You may have to:

sudo chown .deb in the source directory to make it yours and the move that to another location so that you have it on hand if you need it, then you can delete the source folder.

Note 1: Step #3 may not be required if you open the untarred folder with "open folder as root" from the right click menu (for Linux Mint users only).

Note 2: Though your newly installed app will appear in the Linux Mint Software Manager, reviews cannot be submitted for it.

P.S. Thanks go out to ckristi for helping out with this tuto smiley


Tags: create install debian .deb package checkinstall
Created: 3 years ago.
Last edited: 3 years ago.
Read 3399 times.

Comments
4 months ago

andrewied
I met a strange problem. First, I already succeed until the
"configure && make && sudo checkinstall" command. Then came error message about dbus_glib package. I try to solve this by installing the package using Synaptic, and the problem resolved. But then, there's a similar problem occur: sqlite3 error message. I try the same solution, and sqlite3 package already installed, but the message still occur says: No package 'sqlite3' found. Any suggestion?
 
7 months ago

Tomas_IV
In case of problems in STEP 2, I would add one optional command to STEP 1:

$ sudo apt-get build-dep transmission

This should ensure specific prerequisities of the given software compilation are installed. It can help in many cases and it is fully automatic, but:
- Works only for software, which is in the repos (although different version), and on the assumption, that the version in repos does not have too much different prerequisities than the one compiled.
- Unfortunately for beginners, it is also needed to add source repositories (one-time work). This means to do this (replace 'gedit' with your favorite console or gui text editor, like nano, vi, bluefish, leafpad...):

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
$ sudo gedit /etc/apt/sources.list

There you see lines strating with "deb http://...." and possibly some lines starting with "deb-src http://" you have to make it so all the lines starting with deb... have a copy starting with deb-src... To do that, make identical copy of every line starting with 'deb', and then change the 'deb' to 'deb-src' in the second copy of the same line. If the created deb-src lines contain the [arch...] brackets, remove them. No need to do this all for the lines with security word in them. So for example my sources.list chaged from:

deb [arch=amd64,i386] http://linux-mint.froonix.org/ debian main upstream import
deb-src http://linux-mint.froonix.org/ debian main upstream import #Added by software-properties
deb http://tux.rainside.sk/mint/debian/latest testing main contrib non-free
deb [arch=amd64,i386] http://tux.rainside.sk/mint/debian/latest/security testing/updates main contrib non-free
deb http://tux.rainside.sk/mint/debian/latest/multimedia testing main non-free

to:

deb [arch=amd64,i386] http://linux-mint.froonix.org/ debian main upstream import
deb-src http://linux-mint.froonix.org/ debian main upstream import #Added by software-properties
deb http://tux.rainside.sk/mint/debian/latest testing main contrib non-free
deb-src http://tux.rainside.sk/mint/debian/latest testing main contrib non-free
deb [arch=amd64,i386] http://tux.rainside.sk/mint/debian/latest/security testing/updates main contrib non-free
deb http://tux.rainside.sk/mint/debian/latest/multimedia testing main non-free
deb-src http://tux.rainside.sk/mint/debian/latest/multimedia testing main non-free

NOTE: do *not* copy my sources.list, edit yours! I am using LinuxMint Debian 64bit and my sources are not compatible with LinuxMint 32bit versions or with Ubuntu based LinuxMint.

After editing the souces, run command:

$ sudo apt-get update

In case the output of this command indicates that something went wrong by editing the sources.list, you can revert back to original version by

$ sudo cp /etc/apt/sources.list.backup /etc/apt/sources.list
$ sudo apt-get update

and try again or just give up. ;-)
 
1 year ago

sdibaja
./configure: command not found
now what?
 
2 years ago

sdim
Great job.
Many thanks.
 
2 years ago

genothomas
Nice article :-)  
3 years ago

MrDaleR
This is quite a bit more user friendly the building RPM's. Thanks for the info.  
3 years ago

nolarut
Thank you ckristi for your input. I did leave out a few details and I will revise my original post. Thanks again for checking out my tuto.

-NR
 
3 years ago

ckristi
Very interesting article i must say. Please specify if after you run checkinstall the package will also be automatically installed, because you only mention that a package will be created and can be removed.
I presume it's auto-installed, but I never used checkinstall and I do not know it's default behavior. This may apply to newbies also. :-)

Also, in the first package list you forgot to mention the checkinstall package.
 

Other tutorials from nolarut