问题
这个问题以及包含解决该问题的各种方法的答案几乎每天都会在我们的交流中多次出现。如果搜索结果将您带到这里欢迎!如果我在链接到您的问题中留下的评论,您可以放心地假设您的问题可以添加到下面的列表中,因为它属于同一类别:
- gcc降级后glib和gcc之间的分歧
- 如何在 Fedora 39 上降级到特定的 gcc 版本?
- 如何在 arch linux 中安装一些 gcc 编译器?
- Debian Bullseye:安装 gcc-11.4.0 和依赖项
这些只是[gcc]
搜索词降级所标记的众多问题中的四个。那些知识渊博、能够先来交流的读者/用户几乎总是会问我怎样才能……”那些尝试过失败的不幸读者几乎总是会说“它坏了”,或者“我想我坏了一些东西”。这个问题和答案,我将尝试解释为什么混合编译器会破坏所有Linux,并且在答案中我将提供我所知道的解决问题的最简单方法,这不会导致损坏,但会花费一些开销设置的时间和空间。由于这将是社区贡献的问答,如果您喜欢我的方法,我恳请您投票。
问题解释
TLDR:跳至为什么降级编译器会导致问题?
我在各种答案中使用了下面的图片两到三次,我觉得它为我们所有人提供了一个很好的起点。我意识到它很大,因此,如果您愿意,我敦促读者在单独的选项卡中打开它并进行缩放等。
在该列表中找到您的发行版,然后继续阅读。您会注意到您的发行版有一个父发行版。好吧,好吧,我知道使用父发行版(时间轴最左边的发行版)的读者会问:
我正在使用最左边的一个,那么它的父母在哪里?
现在我们进入这个问题的核心。例如,让我们填写$X
我$Y
的标题(耐心的读者,$Z
即将出现)
$X = Fedora 39
$Y = 13.2.1-6.fc39
定义
- Distribution (Quoting Wikipedia):
A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that includes the Linux kernel and often a package management system.
- Package Management System (Quoting Again):
A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner
Knowing these two items helps us answer the Parent Distribution question, but unfortunately with another question: How Do the distribution maintainers create a distribution?
The Answer: All linux software minus the kernel is stored at and can be obtained from the GNU Software FTP Site in source code archives. All Linux Kernels are available for download in source code archives at The Linux Kernel Archives. In short, all Distributions begin from the same source code, including the parent distributions
Why Does Downgrading Compilers Cause Issues?
From the definition earlier, a distribution is a group or set of related software. This relation can be seen in your distribution's repository (or whatever else your distribution has chosen to name it).
At the time a new version (in our Example $X
= Fedora 39) is made available the repository for that version is locked, specifically version locked, meaning that every package in that repository is now frozen in time. Once frozen it isn't altered. It can only live as long as the version is supported or die when the version is upgraded.
The tools required to build GCC are also in the now frozen repository. If a user attempts to upgrade or downgrade the GCC that was shipped in the frozen repository, the version locking would be broken if you were to succeed. To prevent the breakage from happening, your OS'es Package Manager prevents this.
Read my answer to find out how I overcame $Z