type
status
date
slug
summary
tags
category
icon
password
操作记录
报错
- [root@localhost yum.repos.d]#
yum makecache
Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository extras is listed more than once in the configuration CentOS-8 - AppStream 1.3 MB/s | 8.4 MB 00:06 CentOS Base 24 kB/s | 7.9 kB 00:00 Errors during downloading metadata for repository 'CentOS-Base':
- Status code: 404 for http://mirror.centos.org/centos/8/os/x86_64/repodata/repomd.xml (IP: 54.179.252.114) 错误:为仓库 'CentOS-Base' 下载元数据失败 : Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried [root@localhost yum.repos.d]#
解决
列出所有文件
[root@localhost yum.repos.d]#ll
总用量 64 -rw-r--r--. 1 root root 206 4月 12 15:04 CentOS-AppStream.repo -rw-r--r--. 1 root root 1417 4月 12 14:44 CentOS-Base.repo -rw-r--r--. 1 root root 198 4月 12 15:04 CentOS-Extras.repo -rw-r--r--. 1 root root 607 4月 12 14:59 CentOS-Linux-AppStream.repo -rw-r--r--. 1 root root 591 4月 12 14:58 CentOS-Linux-BaseOS.repo -rw-r--r--. 1 root root 1130 9月 15 2021 CentOS-Linux-ContinuousRelease.repo -rw-r--r--. 1 root root 318 9月 15 2021 CentOS-Linux-Debuginfo.repo -rw-r--r--. 1 root root 732 9月 15 2021 CentOS-Linux-Devel.repo -rw-r--r--. 1 root root 596 4月 12 15:00 CentOS-Linux-Extras.repo -rw-r--r--. 1 root root 719 9月 15 2021 CentOS-Linux-FastTrack.repo -rw-r--r--. 1 root root 740 9月 15 2021 CentOS-Linux-HighAvailability.repo -rw-r--r--. 1 root root 693 9月 15 2021 CentOS-Linux-Media.repo -rw-r--r--. 1 root root 706 9月 15 2021 CentOS-Linux-Plus.repo -rw-r--r--. 1 root root 724 9月 15 2021 CentOS-Linux-PowerTools.repo -rw-r--r--. 1 root root 1124 9月 15 2021 CentOS-Linux-Sources.repo编辑替换文件
[root@localhost yum.repos.d]#vim CentOS-Linux-BaseOS.repo
[root@localhost yum.repos.d]#vim CentOS-Base.repo
清除缓存
[root@localhost yum.repos.d]#yum clean all
Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository extras is listed more than once in the configuration 7 文件已删除建立缓存
[root@localhost yum.repos.d]#yum makecache
Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository extras is listed more than once in the configuration CentOS-8 - AppStream 1.0 MB/s | 8.4 MB 00:08 CentOS-8 - Base 1.6 MB/s | 4.6 MB 00:02 CentOS-8 - Extras 1.7 MB/s | 4.6 MB 00:02 元数据缓存已建立。安装gcc
[root@localhost yum.repos.d]#sudo yum install gcc-c++
Repository AppStream is listed more than once in the configuration Repository BaseOS is listed more than once in the configuration Repository extras is listed more than once in the configuration 上次元数据过期检查:0:00:37 前,执行于 2024年04月12日 星期五 15时10分03秒。依赖关系解决。
软件包 架构 版本 仓库 大小
安装: gcc-c++ x86_64 8.5.0-4.el8_5 AppStream 12 M 升级: libgcc x86_64 8.5.0-4.el8_5 BaseOS 79 k libgomp x86_64 8.5.0-4.el8_5 BaseOS 206 k libstdc++ x86_64 8.5.0-4.el8_5 BaseOS 453 k 安装依赖关系: cpp x86_64 8.5.0-4.el8_5 AppStream 10 M gcc x86_64 8.5.0-4.el8_5 AppStream 23 M glibc-devel x86_64 2.28-164.el8 BaseOS 1.0 M glibc-headers x86_64 2.28-164.el8 BaseOS 480 k isl x86_64 0.16.1-6.el8 AppStream 841 k kernel-headers x86_64 4.18.0-348.7.1.el8_5 BaseOS 8.3 M libstdc++-devel x86_64 8.5.0-4.el8_5 AppStream 2.0 M libxcrypt-devel x86_64 4.1.1-6.el8 BaseOS 25 k
事务概要
安装 9 软件包
升级 3 软件包
总下载:59 M
确定吗?[y/N]:
y
下载软件包:
(1/12): cpp-8.5.0-4.el8_5.x86_64.rpm 966 kB/s | 10 MB 00:11
(2/12): gcc-c++-8.5.0-4.el8_5.x86_64.rpm 1.1 MB/s | 12 MB 00:11
(3/12): isl-0.16.1-6.el8.x86_64.rpm 687 kB/s | 841 kB 00:01
(4/12): glibc-devel-2.28-164.el8.x86_64.rpm 907 kB/s | 1.0 MB 00:01
(5/12): libstdc++-devel-8.5.0-4.el8_5.x86_64.rpm 1.0 MB/s | 2.0 MB 00:02
(6/12): glibc-headers-2.28-164.el8.x86_64.rpm 1.0 MB/s | 480 kB 00:00
(7/12): libxcrypt-devel-4.1.1-6.el8.x86_64.rpm 98 kB/s | 25 kB 00:00
(8/12): libgcc-8.5.0-4.el8_5.x86_64.rpm 568 kB/s | 79 kB 00:00
(9/12): libgomp-8.5.0-4.el8_5.x86_64.rpm 804 kB/s | 206 kB 00:00
(10/12): libstdc++-8.5.0-4.el8_5.x86_64.rpm 865 kB/s | 453 kB 00:00
(11/12): kernel-headers-4.18.0-348.7.1.el8_5.x86_64.rp 930 kB/s | 8.3 MB 00:09(12/12): gcc-8.5.0-4.el8_5.x86_64.rpm 988 kB/s | 23 MB 00:24
总计 2.4 MB/s | 59 MB 00:24
CentOS-8 - AppStream 1.6 MB/s | 1.6 kB 00:00
导入 GPG 公钥 0x8483C65D:
Userid: "CentOS (CentOS Official Signing Key) [email protected]"
指纹: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
来自: /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
确定吗?[y/N]:
y
导入公钥成功
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
准备中 : 1/1
升级 : libgcc-8.5.0-4.el8_5.x86_64 1/15
运行脚本: libgcc-8.5.0-4.el8_5.x86_64 1/15
升级 : libstdc++-8.5.0-4.el8_5.x86_64 2/15
运行脚本: libstdc++-8.5.0-4.el8_5.x86_64 2/15
安装 : libstdc++-devel-8.5.0-4.el8_5.x86_64 3/15
升级 : libgomp-8.5.0-4.el8_5.x86_64 4/15
运行脚本: libgomp-8.5.0-4.el8_5.x86_64 4/15
安装 : kernel-headers-4.18.0-348.7.1.el8_5.x86_64 5/15
运行脚本: glibc-headers-2.28-164.el8.x86_64 6/15
安装 : glibc-headers-2.28-164.el8.x86_64 6/15
安装 : libxcrypt-devel-4.1.1-6.el8.x86_64 7/15
安装 : glibc-devel-2.28-164.el8.x86_64 8/15
运行脚本: glibc-devel-2.28-164.el8.x86_64 8/15
安装 : isl-0.16.1-6.el8.x86_64 9/15
运行脚本: isl-0.16.1-6.el8.x86_64 9/15
安装 : cpp-8.5.0-4.el8_5.x86_64 10/15
运行脚本: cpp-8.5.0-4.el8_5.x86_64 10/15
安装 : gcc-8.5.0-4.el8_5.x86_64 11/15
运行脚本: gcc-8.5.0-4.el8_5.x86_64 11/15
安装 : gcc-c++-8.5.0-4.el8_5.x86_64 12/15
清理 : libstdc++-8.5.0-3.el8.x86_64 13/15
运行脚本: libstdc++-8.5.0-3.el8.x86_64 13/15
清理 : libgcc-8.5.0-3.el8.x86_64 14/15
运行脚本: libgcc-8.5.0-3.el8.x86_64 14/15
运行脚本: libgomp-8.5.0-3.el8.x86_64 15/15
清理 : libgomp-8.5.0-3.el8.x86_64 15/15
运行脚本: libgomp-8.5.0-3.el8.x86_64 15/15
验证 : cpp-8.5.0-4.el8_5.x86_64 1/15
验证 : gcc-8.5.0-4.el8_5.x86_64 2/15
验证 : gcc-c++-8.5.0-4.el8_5.x86_64 3/15
验证 : isl-0.16.1-6.el8.x86_64 4/15
验证 : libstdc++-devel-8.5.0-4.el8_5.x86_64 5/15
验证 : glibc-devel-2.28-164.el8.x86_64 6/15
验证 : glibc-headers-2.28-164.el8.x86_64 7/15
验证 : kernel-headers-4.18.0-348.7.1.el8_5.x86_64 8/15
验证 : libxcrypt-devel-4.1.1-6.el8.x86_64 9/15
验证 : libgcc-8.5.0-4.el8_5.x86_64 10/15
验证 : libgcc-8.5.0-3.el8.x86_64 11/15
验证 : libgomp-8.5.0-4.el8_5.x86_64 12/15
验证 : libgomp-8.5.0-3.el8.x86_64 13/15
验证 : libstdc++-8.5.0-4.el8_5.x86_64 14/15
验证 : libstdc++-8.5.0-3.el8.x86_64 15/15已升级:
libgcc-8.5.0-4.el8_5.x86_64 libgomp-8.5.0-4.el8_5.x86_64
libstdc++-8.5.0-4.el8_5.x86_64
已安装:
cpp-8.5.0-4.el8_5.x86_64 gcc-8.5.0-4.el8_5.x86_64
gcc-c++-8.5.0-4.el8_5.x86_64 glibc-devel-2.28-164.el8.x86_64
glibc-headers-2.28-164.el8.x86_64 isl-0.16.1-6.el8.x86_64
kernel-headers-4.18.0-348.7.1.el8_5.x86_64 libstdc++-devel-8.5.0-4.el8_5.x86_64
libxcrypt-devel-4.1.1-6.el8.x86_64
完毕!
查看gcc配置情况
[root@localhost yum.repos.d]# gcc -v 使用内建 specs。 COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 目标:x86_64-redhat-linux 配置为:../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux 线程模型:posix gcc 版本 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)
- 作者:YOUNGQI
- 链接:https://blog.creatforlyq.eu.org/article/CentOS8-YUM
- 声明:本文采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。