What is the difference between yum, apt-get, rpm, ./configure && make install?

148,172

Solution 1

These tools all install software into your system, but are working on different levels.

  • ./configure && make install

    Running ./configure && make install builds and installs the libraries or executables directly from the source code.

    The make install step basically just copies the final files into your system. Many sources come with a special make uninstall rule to remove them again, but this is not guaranteed and of course only works as long as you have the configured sources around. Also, this does not take care of required dependencies.

    Often there is only the source code available for a certain package, so this is the only way to go. Also, ./configure usually accepts lots of options allowing you to tailor your package.

    Not being able to find out what software installed which file, and the lack of a reliable way to remove them from the system are major shortcomings of this approach.

  • RPM (Redhat Package Manager)

    rpm installs already configured and compiled software in your system and it also comes with a uninstall to get rid of it again. The packages have to be created by somebody. This person already decided on what features to include and how to best integrate the package into your system layout. It also comes with a list of dependencies.

    Since rpms are used for many distributions there, you will often want to make sure that this rpm was written for your distribution so that install paths, dependencies and other housekeeping things integrate well.

    On Debian systems, the equivalent package format is .deb and the installation and database is handled by the dpkg tool.

  • Yum

    yum is an additional wrapper around rpm. It keeps its own database of rpm files available for your distribution, generally in online repositories. For the stable versions of most distributions all packages inside that database will play well with each other. This database can be searched (e.g. with yum search some_name).

    It will also automatically resolve dependencies for you. Packages (and with some extra help their dependencies) can be easily uninstalled as well.

    On Debian systems, the equivalent repository and dependency-resolution tools are provided by Apt (apt-get and aptitude).

So to sum it up: if you just want some software try yum first. If it is not available there, you can try to find an existing rpm package. If there is none or you have some special requirements, build from source.

Solution 2

Yum are RPM are the same thing except that yum gets the packages from the net automatically and installs them (using rpm -i) in one step. It should be used whenever possible to ease updating. Use rpm only when there is no package to be found by yum, and use the make method only when there is no .rpm package available or you need to change some compile-time options.

Share:
148,172

Related videos on Youtube

Saif Bechan
Author by

Saif Bechan

I am a Full Stack Web Developer with industry experience building websites and web applications. I specialize in JavaScript and have professional experience in working with PHP, Symfony, NodeJS, React, Redux and Apollo GraphQL. To ensure high quality and standards I have extensive knowledge on CI/CD pipelines such as GitLab CI and testing frameworks such as JUnit, PHPUnit and Cypress.

Updated on September 17, 2022

Comments

  • Saif Bechan
    Saif Bechan over 1 year

    I am new to Linux and am running CentOS. I have come across four ways to update or install software.

    So far, I've seen:

    • yum install [program]
    • apt-get install [program]
    • rpm -i [program].rpm
    • wget [program].tar.gz -> unpack -> ./configure -> make -> make install

    That last one is a real pain, especially coming from Windows, where a program install is usually one click and a nice install wizard.

    So, my questions are:

    • Why are there so many different ways to do this in Linux?
    • Which one do you recommend using, and why?
    • Are there any other ways to install programs in Linux?
    • Josh
      Josh about 14 years
      Also, what about yum vs up2date. I've never been clear on the difference.
    • Kyle Strand
      Kyle Strand over 8 years
      apt-get is for Debian, and really shouldn't show up on CentOS....
  • quack quixote
    quack quixote about 14 years
    pretty much what i was gonna say. added in a mention of the debian equivalents and touched up the formatting.
  • Benjamin Bannier
    Benjamin Bannier about 14 years
    @quack: Thanks. But can't we all just hush up on apt-get or is it still recommended for anything?
  • quack quixote
    quack quixote about 14 years
    you're right, aptitude is probably the better one to recommend; i included apt-get because it's widely referred to, and a reader who doesn't know about aptitude may have heard of apt-get.
  • Thariq Shihipar
    Thariq Shihipar over 11 years
    What's wrong with apt-get?
  • Benjamin Bannier
    Benjamin Bannier over 11 years
    @recursive: At some time apt-get didn't record automatic dependencies and left them behind after an uninstall, while aptitude then introduced proper dependency tracking. In addition then it also provided some additional features not available in apt-get. I am not sure, but I think at some point apt-get and aptitude where updated to use the same, advanced backend providing much of that functionality.