Fixing a bug or experimenting with a program often requires going back to the source. Compiling the program yourself from a tarball usually means you lose the benefits of your package system, such as dependency tracking. Fortunately, Debian and Ubuntu include mechanisms to let you compile packages yourself without straying too far from the world of your package manager. It's actually really easy, because the repositories contain information about where to get source files and how to compile them. (I've tried these instructions on Ubuntu.)
- Install compilers and other dev tools:
sudo apt-get install build-essential devscripts fakeroot
- Install the build-time dependencies for the package:
sudo apt-get build-dep FOO
- Download the source for your package (to the current directory):
apt-get source fooAt this point, you can make whatever modifications you wish to the source.
- Compile the package:
cd FOO-6; debuild -us -ucTo compile with debugging information, use
export DEB_BUILD_OPTIONS="debug nostrip noopt"
- You now have a shiny new .deb file. Install it with
dpkg --install FOO_6-1_i386.debCongratulations!