Ubuntu 18.04,将 gcc 从 8.4 降级到 8.3

Ubuntu 18.04,将 gcc 从 8.4 降级到 8.3

我正在使用一些略微过时的构建工具,这些工具无法与 gcc 8.4 配合使用;它们识别的最新版本是 gcc 8.3。我正在使用 Ubuntu 18.04,运行时apt list gcc-8 --all-versions似乎 gcc 8.3 不再存在于 bionic 存储库中。我该如何降级 gcc-8?

编辑:

我尝试从安装 gccjonathanf 的 gcc 反向移植像这样:

sudo add-apt-repository ppa:jonathonf/gcc
sudo apt install gcc-8=8.3.0-19ubuntu1~18.04.york0

但是,缺少依赖项:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 gcc-8 : Depends: cpp-8 (= 8.3.0-19ubuntu1~18.04.york0) but 8.4.0-1ubuntu1~18.04 is to be installed
         Depends: gcc-8-base (= 8.3.0-19ubuntu1~18.04.york0) but 8.4.0-1ubuntu1~18.04 is to be installed
         Depends: libgcc-8-dev (= 8.3.0-19ubuntu1~18.04.york0) but 8.4.0-1ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

相关内容