Ubuntu uses a packet management philosophy, that is, all programs are put from the deb packages, which store the program itself and the scripts that correctly install / delete / update. Deb packages can be found on the Internet, on disks. The best way to use repositories is the deb package repositories. If you use repositories, then when new versions of the programs you have installed appear in them, it will be easier and faster for you to update them. It is very convenient and allows you to keep the system up to date and protected. Sometimes there is no program requirement in the repositories and it is necessary to compile from source. But this must be done correctly.
Today I want to propose an elegant method that has helped me more than once.
So let's get started.
1) Install the auto-apt program with the command
sudo apt-get install auto-apt
2) Using the cd command, go to the directory with unpacked sources and use the command
sudo auto-apt update && auto-apt -y run ./configure
This command will automatically download and install all the necessary files and libraries, i.e., it will satisfy all dependencies.
3) Now with the
sudo checkinstall -D
command, we will create a deb package used in Debian-based distributions, such as Ubuntu.
4) Now this package can be installed: either by command
sudo dpkg -i pocket_name.deb
Or double click on the package.
5) All of the above applies to Debian-based distributions.
Also, if you run
sudo checkinstall -R
get an rpm package used in Fedora, RHEL, ASP Linux, ALT Linux, Mandriva, openSUSE.
If you run
sudo checkinstall -S
we get the package used in Slackware.
In these two cases, the final installation may be different. If someone has comments or clarifications, write, this will only benefit the case.
Conclusion
This method is convenient because
make install
not used and we do not interfere with the distribution package system. This method is quite elegant and convenient. The created deb package can be correctly removed or replaced with a newer version. This is also true for other package formats created command
sudo checkinstall
with the desired parameter.