How to manage software that is installed from source?
From time to time, we may have to install something from source due to various reasons. While it is fairly standard how to install software given appropriate dependencies, it is not clear to me how to manage such installation for future convenience.
More specifically:
What can we do to ensure an easy and clean uninstallation (including those dependencies that are installed just before and just for the software installed from source)?
What can we do to ensure an easy and clean upgrade of the same software, which will likely be installed from source again?
What can we do to minimize potential conflict if there are a default package (installed using apt-get) as well as the (newer) version of the package (installed from source)?
Using checkinstall make install
will create a temporary package and install it. This means it is recorded in the package manager and can be uninstalled.
The best thing to do would be to make Debian packages of the newer versions yourself. dpkg
and the apt
tools do all three things that you mention and are intended for that purpose. Use them instead of reinventing the wheel. There are plenty of guides on packaging available. If the software already exists in the repositories, you can probably get the source package (apt-get src
) which you can use to study and kick start your own package.
This answer to https://askubuntu.com/a/485230/158442 might be useful as a general guideline.
While checkinstall
is great for a quick and dirty solution, long term you should use proper packaging.