How to install packages in Ubuntu manually

How to install packages in Ubuntu manually

For a long time we have been talking about how install packages and programs through repositories, deb packages, from rpm packages, from PPA's or simply through programs like Synaptic or the Ubuntu Software Center, but we have not talked about how to install a program through its source code. This installation is very messy, but it is also the most satisfactory since, as a general rule, it is the one that best adapts to our operating system, to our machine. To perform this installation, all we have to do is download a compressed package that is almost always of the type tar.gz or gz, what does the program code have and from here compile the files.

What need programs do I need to install packages manually?

Paradoxically, Ubuntu, like other Debian-based systems, doesn't come with all the necessary programs for compiling installed. The package that includes most of the tools isn't installed by default, so you have to install the package manually. Well, to compile a package yourself, you'll need to do this in the terminal:

sudo apt-get install build-essential automake make cmake fakeroot checkinstall dpatch patchutils autotools-dev debhelper quilt xutils lintian dh-make libtool autoconf git-core

This will make Ubuntu install almost all the necessary programs to be able to compile code and by extension to be able to install packages manually.

How do we compile a program ourselves?

Once we have done the previous steps, we open a terminal and go to the source code folder. The first thing we will have to do is see the file «INSTALL»That almost all the programs bring, some do it in«Readme«. As a general rule to compile we will have to write the following

./configure

make

make install

./program name

make clean

Although, in the file Readme or INSTALL The necessary packages and how to install the program will be detailed in detail. I command them ./configure and make they are in charge of configuring and making the program package. The command make install install what was created and with ./ we run the program. Then the command make clean takes care of cleaning unnecessary files that have been created during installation. These are roughly the steps necessary to compile a program, but sometimes it is necessary to install a library or package for the installation to work. Finally, note that although the installation is better, it is a slow installation, that is, to install packages manually it depends on the source code and the power of the machine, so the process can take hours or minutes. That is why it is advisable to do it with time and on powerful computers, although this method of installing packages can be done on any computer.