首先,你要确保可以上网,之后,去设置好yum源,因为看报错,你的yum源没弄好不会搞,就将现有的源文件备份后,全部删除,之后重新下载国内源的文件也可以,或者自己编写内容也可以。
我喜欢用阿里源,设置方法,如下:阿里源基础包设置方法:https://developer.aliyun.com/mirror/centos阿里云EPEL源设置方法:https://developer.aliyun.com/mirror/epel