2

I recently downloaded the official desktop version of 20.04.1 and installed it on a machine. I was surprised to find that there was no gcc command available! I installed it with apt but I always thought that every flavour of Linux came with gcc straight out of the box.

Has something recently changed in the release philosophy of Ubuntu?

Pilot6
  • 88,764
  • 91
  • 205
  • 313
NickT
  • 2,093
  • 3
  • 24
  • 32
  • 2
    No it doesn't, and whilst I can't confirm if it was ever a default, I've always had to install `build-essential` manually (but I wasn't a user for 4.10). *I would expect that, given most users of Ubuntu (inc. flavors) are users, and not developers* – guiverc Sep 20 '20 at 12:27
  • I've never, ever had to do it before, going back to sometime before version 12. Also with Xbuntu, debian, all the raspbian flavours had it. – NickT Sep 20 '20 at 12:29
  • I mainly use *flavors*, and a QA install made today (*groovy* as that's the current testing release) doesn't have it installed, though some gcc-10 libraries are present (no `gcc` package for Lubuntu) *Neither for Kubuntu 20.04.1* – guiverc Sep 20 '20 at 12:42
  • Concur, `aptitude why gcc` on our 18.04 systems (Ubuntu, Lubuntu) gives `build-essential` as the reason for presence. – Organic Marble Sep 20 '20 at 14:49

1 Answers1

3

The default version of gcc in Ubuntu 20.04 is gcc-9. Ubuntu 20.04 comes with gcc-9 installed by default which can be tested if it is installed by running apt policy gcc-9. gcc is the GNU C compiler, a fairly portable optimizing compiler for C. For more information type man gcc

gcc-10 is available in the default repositories of Ubuntu 20.04 and later. gcc-11 is available in Ubuntu 21.04 and later.

karel
  • 110,292
  • 102
  • 269
  • 299
  • Well 20.04.1 - didn't have it, so there seems to some disagreement between those answering and commenting – NickT Sep 20 '20 at 12:33
  • @NickT I guess for a definitive answer one would need to scrape the `.manifest` files at [releases.ubuntu.com](http://releases.ubuntu.com/) and/or [old-releases.ubuntu.com](http://old-releases.ubuntu.com/releases/) – steeldriver Sep 20 '20 at 16:04
  • 2
    The .manifest file for 20.04 has gcc-9 and gcc-10 with gcc-9 being the default gcc. – karel Sep 20 '20 at 16:05
  • Can we expect GCC11 to become available in ubuntu 20.04 repositories at some point? – Silicomancer Jul 21 '21 at 22:27
  • @Silicomancer We don't expect gcc-11 to become available in 20.04, but I posted an answer about how to download gcc-11 manually from the default Ubuntu 21.04 repositories and install it in Ubuntu 20.04 [here](https://stackoverflow.com/a/68426284/). – karel Jul 21 '21 at 22:34
  • @Silicomancer The "28 things only developers will find funny" hyperlink on your profile tab at Ask Ubuntu and Stack Overflow is broken, but it can be replaced by [this archived link](https://web.archive.org/web/20130727082620/https://www.buzzfeed.com/lukelewis/28-things-only-developers-will-find-funny). – karel Jul 21 '21 at 22:52
  • @karel Ok, I will try your guide as soon as possible. Also changed the link, thanks! Do you know why GCC11 isn't on the roadmap? Ubuntu 20.04 is an LTs that will be supported quite some time... I would have expected to get GCC11 sooner or later. – Silicomancer Jul 21 '21 at 23:16
  • @Silicomancer Please refer to this question : [Why don't the Ubuntu repositories have the latest versions of software?](https://askubuntu.com/q/151283/) – karel Jul 22 '21 at 01:04