0

Does it make any difference (dependencies/installed software etc.) when gcc was installed before build-essential?

To be more specific, is it any difference between:

apt install gcc
apt install build-essential 

AND

apt install build-essential
sourav c.
  • 44,715
  • 2
    build-essential includes as a dependancy, gcc so the second version of commands will install gcc as part of installing build-essential. In short, there is no difference. – Charles Green Jul 24 '18 at 14:04

1 Answers1

1

For the specific case of gcc and build-essential from the Ubuntu repositories, there is only one difference: Explicitly installing gcc (via apt install gcc or apt install gcc build-essential) marks it as manually installed. This means that using apt autoremove after uninstalling build-essential (and any other packages depending on gcc) will not remove gcc or any of its dependencies.

In the general case, nothing more can be definitely said about installing a dependency X first and then the dependent package Y. It's possible that X is one of many fulfilling the particular dependency, and installing Y directly could have caused another package to be installed instead of X.

See also:

muru
  • 197,895
  • 55
  • 485
  • 740