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, does not have all installed the programs needed to compile. The package that included most of the tools is not installed as standard, so you have to install the package by hand. Well, to compile a package ourselves we will 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.


7 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Gerson said

    It has happened to me that I lower a file tar.gz or tar.bz2 or similar, and when doing the ./configure it throws an error; I look for the Install or the Readme and many do not bring it, but if I touch the executable of the program it opens, it is as if a laptop were downloading but many times I want to install it and I have not been able to.
    How is it done in those cases?

  2.   Joaquín García said

    Hi Gerson, could you tell me the package or program you want to use. From what you say, what you have downloaded is a precompiled or almost ready-to-use package, which is something different than installing from source code. But first I wanted to make sure. Thank you and sorry for the inconvenience.

  3.   Fosco_ said

    Maybe the article should be called "How to compile programs in Ubuntu", when seeing the manual installation of packages I thought you would talk about dpkg -i package

  4.   Jose Manuel Benedito said

    Hi Joaquin
    Thank you very much for attending your blog. I think it's great, and for that I thank you.
    I wanted to ask you about the installation of a program (the Warzone, for example), with the type of compilation (I think it is called that) that Gerson asks, because I have tried to do what you say, but I do not understand exactly how it is done, with the steps as for someone who is learning to read…. The truth is that I do some things with the terminal, but I have been trying to do these things for a while and I have not found a detailed explanation, as in a class…. You could do it?

    From now on I thank you and receive a cordial greeting

    José Manuel

  5.   Marco said

    Hello, my name is Marco, I would like to learn about the Linux world, I have Ubuntu 13.10 but it is very difficult for me to handle it, installing something is difficult, since in every program it tells me that this or that package is missing. Thanks

  6.   Jose Lamb said

    Geniaaallll brother, I was looking for that. Difficult to find it so detailed and therefore sooo grateful. Successes of heart for you

  7.   Juan David said

    Good afternoon, I have tried to install this program darktable-3.0.1.tar.xz I have not been able, I am new to using Ubuntu. I would appreciate your collaboration.