今天我在虚拟机上安装 NetCore 的 SDK 的时候,出现错误,执行命令:“yum install dotnet-sdk-3.1
”,最后安装失败,很多安装包没有找到镜像。
解决方式:
1、输入命令:yum clean all
#yum clean all
2、输入命令:yum makecache
#yum makecache
1 [root@localhost ~]# yum clean all 2 已加载插件:fastestmirror 3 正在清理软件源: base extras updates 4 Cleaning up everything 5 [root@localhost ~]# yum makecache 6 7 base | 3.6 kB 00:00 8 extras | 3.4 kB 9 updates | 10 (1/12): base/7/x86_64/group_gz | 166 kB 11 (2/12): extras/7/x86_64/filelists_db | 603 kB 02 12 (3/7/x86_64/prestodelta | 100 kB 13 (4/7/x86_64/primary_db | 205 kB 14 (5/7/x86_64/other_db | 126 kB 15 (6/6.9 MB 07 16 (7/12): updates/3.4 MB 05 17 (8/578 kB 18 (9/5.9 MB 12 19 (10/6.0 MB 20 (11/2.5 MB 15 21 updates/7/x86_64/prestodelta Failed 22 http://mirrors.njupt.edu.cn/centos/7.5.1804/updates/x86_64/repodata/8ee07a5e1fde5231fed8ce55547405923af529a0902e57aeee1676035ae7a367-prestodelta.xml.gz: [Errno 12] Timeout on http://10.10.254.10/cache/2/02/mirrors.njupt.edu.cn/a8bc5955244fcfe9599025498ceada44/8ee07a5e1fde5231fed8ce55547405923af529a0902e57aeee1676035ae7a367-prestodelta.xml.gz: (28,'Connection timed out after 31022 milliseconds') 23 正在尝试其它镜像。 24 (12/679 kB 25 Determining fastest mirrors 26 * : mirrors.nwsuaf.edu.cn 27 * extras: centos.ustc.edu.cn 28 * updates: mirror.lzu.edu.cn 29 元数据缓存已建立
3、结束也可以再给yum来个升级【可选】。
#yum -y update