为 CentOS 安装过时的 Devtoolset 集合

Install Obsolete Devtoolset Collection for CentOS

目前无法使用 yum 从软件集合存储库 (centos-release-scl) 安装 Devtoolset-5(及更早版本)(仅 Devtoolset-6 和 7 可用)。不过,这个集合可以作为 rpm 包列表下载。是否可以为 yum 启用此类 EOL 集合,或者是否有其他正确安装它们的方法?

没有 DTS 5 版本。一旦 GCC 切换到每年增加的版本号,它就会被跳过以使 DTS 版本与 GCC 主要版本保持一致。

DTS 版本 3 和 4 可从 centos-release-scl 存储库获得。

您可以通过以下方式安装过时的 devtoolset-3:

sudo yum --obsolete install devtoolset-3

而 Devtoolset-3 和 4 位于 Centos 镜像 site, yum will not be able to find them as they were not included in the repodata on the site. These were probably excluded because they are EOL (end-of-life), and have dependency bugs (Bug 1410152)。在这里尝试使用 older Devtoolset-3 包,它没有依赖性问题:

https://copr.fedorainfracloud.org/coprs/rhscl/devtoolset-3/

如果您确实需要 centos.org 站点的软件包,我会使用 wget 下载所有 RPM,然后重新创建一个本地 yum 存储库。但是,您会看到依赖性问题并且 yum install devtoolset-3 将失败。

$ wget -r -p -e robots=off --directory-prefix="/mnt/local-devtoolset3-repo" --recursive --no-clobber --no-parent http://mirror.centos.org/centos/6/sclo/x86_64/rh/devtoolset-3/
$ sudo yum install createrepo
$ cd /mnt/local-devtoolset3-repo
$ createrepo --database .