Checkinstall is extremely useful utility to create .deb packages for Debian, Ubuntu (or .rpm packages for Fedora, RedHat, CentOs) from .tar.gz (or .tgz) source tarball after it’s compiled at your Linux box. In other words you can prepare binary package for later usage without need to compile software from sources every time you need to get it installed on certain Linux box.
Another application of checkinstall is software deinstallation that was compiled and installed from sources. As you might already noticed, not every programmer adds “uninstall” rule to Makefile and thus command “make uninstall” would fail. The nice solution is to use checkinstall to prepare binary package from sources and then install or uninstall it with dpkg command (or rpm in RedHat based distributions).
Here is the short algorithm on how to prepare .deb package from clamav source tarball:
1. Install checkinstall:
sudo aptitude -y install checkinstall (Ubuntu, Debian and related distributions)
or
sudo yum install -y checkinstall
(for rpm based distributions, please note that checkinstall usually isn’t included to standard Fedora/RedHat repositories, so you will need to link up third party repo like DAG)
or
compile checkinstall from sources
2. Get clamav sources:
wget http://mesh.dl.sourceforge.net/sourceforge/clamav/clamav-0.81.tar.gz (as an example)
3. Install libraries that might be necessary for clamav compilation:
sudo aptitude install libgmp3 libgmp3-dev
(this command is applicable for Debian and certainly will be different for Fedora or RedHat)
4. Compile clamav:
tar xvfz clamav-0.81.tar.gz
cd clamav-0.81/
./configure --sysconfdir=/etc
make
5. Run checkinstall and follow its intuitive instructions (enter package description etc.):
sudo checkinstall -D make install
6. When finished you’ll get clamav-0.81_0.81-1_i386.deb (or rpm package if you use Fedora/RedHat/CentOs) you may want to install with sudo dpkg -i clamav-0.81_0.81-1_i386.deb (or sudo rpm -i ...) or move to another PC for later installation.
good
========================= Installation results ===========================
make: *** No rule to make target `install'. Stop.
**** Installation failed. Aborting package creation.
Cleaning up...OK
Bye.
This is what i got when i tried creating a deb file for this
http://nsl10.csie.nctu.edu.tw/products/nctuns/dow...
Please mail me if u find a solution
mailto:hemanth.hm@gmail.com
./configure --sysconfdir=/etc
bash: ./configure: No such file or directory
forgot to mention that
I'm a fresh user of linux and using Debian
This is one of the first packegs i try to install
I've tryied putting this command in the terminal as a SU:
'aptitude -y install checkinstall'
Cant find package named 'checkinstall' in aptitude..
Am i doing somthing wrong?
Thx!
Hi Kfir and Hemant,
If you still need help on that, I was having the same problem as yours.
I am following a tutorial from falkotimme.com (can't find the link but I have the file saved):
===========
Creating .deb-Packages With Checkinstall
Version 1.0
Author: Falko Timme
Last edited 02/04/2005
Checkinstall is a nice tool to create simple .deb-packages that you can use in your local network (e.g. if you have to install the same piece of software on multiple computers running Debian). It lets you compile and install software from the sources like before, but with the difference that you end up with a simple Debian package which also means that you can easily uninstall the software you just compiled by running dpkg -r!
I will demonstrate the use of checkinstall by compiling and installing the anti-virus software ClamAV on a Debian system.
This howto is meant as a practical guide; it does not cover the theoretical backgrounds. They are treated in a lot of other documents in the web.
This document comes without warranty of any kind!
1 Install Checkinstall
It is as easy as 1-2-3:
apt-get install checkinstall
If your system tells you that it does not know a package called checkinstall then add the following line to /etc/apt/sources.list:
deb http://www.backports.org/debian/ woody checkinstall
and run
apt-get update
Then try again to install checkinstall.
2 Install ClamAV
We need the ClamAV sources . We will install the software from the /tmp directory.
cd /tmp
wget http://mesh.dl.sourceforge.net/sourceforge/clamav...
apt-get install libgmp3 libgmp3-dev
groupadd clamav
useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav
tar xvfz clamav-0.81.tar.gz
cd clamav-0.81/
./configure --sysconfdir=/etc
(Please note: ./configure --help gives a list of all configuration options available.)
make
Now comes the main difference: instead of make install we run
checkinstall -D make install
Answer the question "The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs? [y]:" with y.
Then enter a description for your package (e.g. ClamAV 0.81). A summary of the configuration options for your .deb-package will come up:
You can change them here or just hit enter to continue. Now ClamAV will be installed plus a Debian package will be created which you can find in the installation directory /tmp/clamav-0.81 as the final checkinstall summary states:
Now you can copy clamav-0.81_0.81-1_i386.deb to other Debian computers and run
dpkg -i /path/to/clamav-0.81_0.81-1_i386.deb
to install it. If you want to remove it, just run
dpkg -r clamav-0.81
This even works on the computer you compiled ClamAV on! This is a nice way to install software from the sources and remove it if you are unsatisfied with the result.
Thanks to this tutorial, I've made another that explains how to make a .deb file for Stellarium 0.10.0
I've tested it on A linux Mint machine.
Jeroen
http://ubuntu-install.blogspot.com/2009/02/how-to...
Hy,
checkinstall seems to be a very good idea to simplify the installation step before doing some test on a application !
Could it simplify the packaging task for developpers ?
Does it handle dependencies rules automatically ? I mean does it includes in the package description the libraries or packages versions needed to run the software ?
Kindest Regards,
Laurent
Pingback : Checkinstall for linux newbies « SGLNX
????????? ?? ?? ??? ??????????, ?????? ?????????????? ??????????? ???????. ;)
This is a smart blog page. I imply it. You have so significantly know-how about this issue, and so considerably passion. You also know how to make people rally behind it, definitely from the responses. Youve got a layout here thats not also flashy, but would make a statement as large as what youre declaring. Fantastic career, in truth.
We across here alternate website and considered I might as well check things out at Create .deb or .rpm from .tar.gz with checkinstall - Linux * Screw . We like what I discover so now I'm a fan. Look forward to going over your web page again... Before I forget whats the latest on Egypt dramatic news flash what do you reckon ... Take care ! Rob Rasner Twitter