Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm sorry but I have tried the tutorials on various websites. Nothing, so far, has worked. I'm using Ubuntu Maverick 10.10. I've downloaded, compiled and installed GCC 4.7.0. Now I want to make a .deb file of the GCC 4.7.0. Could anybody give me the sure steps to creating a GCC 4.7.0 .deb file? Thank you!

share|improve this question
up vote 2 down vote accepted

How to make a .deb file of a source package for personal installation/uninstallation only, NOT for distribution

Warning: Note that packaging a source package for distribution via PPA or even via plain .deb is quite complicated and you should start off with this guide and its links as well as this other guide in that case. I have also found the #debian-mentors channel on the official Debian IRC to be a great situation-specific resource for beginning packagers/devs.

To create a deb for personal use, the easy solution for most cases is to simply use checkinstall, which will create a .deb file that you can not only install on other (compatible) systems with the appropriate dependencies installed, but also allows you to uninstall the package. Note that GCC is a large and complex package, so checkinstall may not work with it!

  • sudo apt-get install checkinstall -y
  • When done with make, run checkinstall instead of make install
  • checkinstall will install your application AND give you a .deb file in the current (source) folder which you can simply copy and install on other systems with dpkg -i
  • Use dpkg -r application-name to remove the application at any time (should also work from Synaptic)
share|improve this answer
I'm sorry to reply so late but your answer was very good. I use checkinstall now frequently. It fails about 25% of the time but I can always debug the process when that happens. It's so strange that this app is not included in the Ubuntu standard package! – Joel Frese Nov 17 '12 at 14:44

There is a Guide:

share|improve this answer
I don't want a guide, I just want a quick answer but thank you. The best quick answer I got was the: checkinstall --install=yes I think I found that answer somewhere else. Sometimes that checkinstall fails but more often than not, it succeeds. – Joel Frese Sep 22 '12 at 14:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.