Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
27
rated 0 times [  27] [ 0]  / answers: 1 / hits: 18911  / 3 Years ago, tue, september 14, 2021, 5:30:10

When using the apt-get install method to install a package onto ubuntu, is there any fundamental difference between obtaining the source code for that package and building it from scratch? Does the apt-get install functionality simply download source and build it on your machine to a specified directory or is there more going on behind the scenes ?



Finally (maybe this has no answer) is one method better than the other? What I am angling at here is does the build it yourself from source code have any advantages or is it better to let apt-get do its thing?


More From » apt

 Answers
1

The advantages of a package management system such as apt, yum, pacman, emerge, etc include:




  • It's easy to query what version of a package is installed or available.

  • It's easy to remove a package entirely, making sure all its files are gone.

  • It's easy to verify the integrity of the packages files, so you can see if it's been corrupted or tampered with.

  • It's easy to upgrade a package by installing the new version and removing all the old versions files. This will make sure not to leave any lingering files from the old package around to confuse or break things.

  • It's easy to see what packages require or provide things that other packages provide or require, so you can be sure to have the needed items for the package to function correctly.

  • It's easy to install or remove groups of packages.

  • In many cases it's possible to downgrade back to a previous version of a package, for example when a new version has a bug.



Although it is for Fedora, see also:



https://fedoraproject.org/wiki/Package_management_system



Installing from source may have advantages




  • You can customize the binaries (enable / disable options)

  • More up to date package then is available in the repositories

  • Sometimes necessary for bug fixes



But the disadvantages are that you will have to then manually update the package when a new version is available and you will often loose support.



IMO if you wish to compile all or most of your packages, I would advise Gentoo.


[#36926] Wednesday, September 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cugure

Total Points: 188
Total Questions: 110
Total Answers: 103

Location: Dominican Republic
Member since Sun, Sep 4, 2022
2 Years ago
;