咨询Ubuntu 16.04/18.04的GCC更新时间及18.04新版本计划
Hey there, let's break down your questions about GCC versions in Ubuntu 16.04 and 18.04 clearly:
GCC Updates for Ubuntu 16.04 LTS
Ubuntu 16.04 is a long-term support (LTS) release, and its core package philosophy prioritizes stability over bleeding-edge updates. That means the default GCC 5.4 in the main repository won’t get upgraded to a major new version like 7.x through regular system updates. Instead, it will only receive critical security patches and bug fixes for the rest of its support lifecycle (main support until April 2026, with extended security maintenance available beyond that).
If you need a newer GCC version on 16.04, you have two reliable options:
- Use the trusted
ppa:ubuntu-toolchain-r/testPPA to install newer GCC versions alongside the default one. This is the easiest way to get access to newer releases without breaking your system. - Compile GCC from source code yourself if you need full control over the build configuration.
GCC in Ubuntu 18.04 LTS
Great news here: Ubuntu 18.04 LTS ships with GCC 7.3.0 by default—this is a big step up from 16.04’s GCC 5.4. So you absolutely get a much newer, more feature-rich GCC version out of the box with this release.
Just like 16.04, the main repository won’t push major version upgrades (like to GCC 8 or 9) as part of standard updates. But if you need even newer versions, you can again use the ppa:ubuntu-toolchain-r/test PPA to install them. When doing this, remember you can use update-alternatives to set your preferred GCC version as the system default if needed, without overwriting the original compiler.
内容的提问来源于stack exchange,提问作者Kushajveer

