How to Update GCC Latest Version?

About programming and getting involved with Linux Mint development
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
AwitPH
Level 1
Level 1
Posts: 8
Joined: Thu Jul 21, 2022 11:08 pm

How to Update GCC Latest Version?

Post by AwitPH »

Hello! I'm a newbie programmer, I'd like to update my GCC for programming purposes.
The version I currently use is 9.4.0 the stable version.
What's the best method to not F-up the system while also being able to use the latest version?
I think updating GCC might cause F-ups? Just my thoughts hahahaha.
Thank you for anyone answering this!!
Top
Last edited by LockBot on Tue Dec 12, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
t42
Level 11
Level 11
Posts: 3747
Joined: Mon Jan 20, 2014 6:48 pm

Re: How to Update GCC Latest Version?

Post by t42 »

install latest Linux Mint or compile it from source

Code: Select all

https://gcc.gnu.org/git/gcc.git
-=t42=-
billyswong
Level 8
Level 8
Posts: 2239
Joined: Wed Aug 14, 2019 1:02 am

Re: How to Update GCC Latest Version?

Post by billyswong »

You are probably running Linux Mint 20.x.

Obviously upgrading your OS to LM 21.x will bring you new version of GCC. The default GCC version in LM 21.x is GCC 11.2.

Of course there are even newer versions, but before proceed, first you shall ask yourself, what is your purpose to chase after the latest GCC? Do you know their actual difference? If not, using the default version is usually good enough for "newbie programmer". C and C++ are mature languages.
User avatar
spamegg
Level 14
Level 14
Posts: 5117
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: How to Update GCC Latest Version?

Post by spamegg »

There are many available packages that let you install different versions. apt install gcc-10 or 11 or 12...

I have 11 and 12 installed simultaneously.

Code: Select all

gcc-12 --version
gcc-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
gcc-11 --version
gcc-11 (Ubuntu 11.3.0-1ubuntu1~22.04.1) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Locked

Return to “Programming & Development”