重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3302|回复: 0
打印 上一主题 下一主题

yum makecache 报错

[复制链接]
跳转到指定楼层
楼主
发表于 2018-1-29 16:33:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 jiawang 于 2018-1-29 16:35 编辑

两台相同操作的系统在配置本地yum源的时候一台配置正常,一台异常,弄了半天也没找出原因,最后把原来默认的yum源配置文件直接rm解决。
[root@rac02 ~]#  cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

在/etc/yum.repos.d/目录新建了一个mnt.repo的本地yum源,验证时报错:
[root@rac02 yum.repos.d]# ls
mnt.repo    public-yum-ol7.repo


[root@rac1 Desktop]# yum  makecache
Loaded plugins: langpacks, ulninfo
Repository ol7_latest is listed more than once in the configuration
http://yum.oracle.com/repo/OracleLinux/OL7/UEKR4/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"
Trying other mirror.

One of the configured repositories failed (Latest Unbreakable Enterprise Kernel Release 4 for Oracle Linux 7Server (x86_64)),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
     1. Contact the upstream for the repository and get them to fix the problem.
     2. Reconfigure the baseurl/etc. for the repository, to point to a working
        upstream. This is most often useful if you are using a newer
        distribution release than is supported by the repository (and the
        packages for the previous distribution release still work).
     3. Run the command with the repository temporarily disabled
            yum --disablerepo=ol7_UEKR4 ...
     4. Disable the repository permanently, so yum won't use it by default. Yum
        will then just ignore the repository until you permanently enable it
        again or use --enablerepo for temporary usage:
            yum-config-manager --disable ol7_UEKR4
        or
            subscription-manager repos --disable=ol7_UEKR4
     5. Configure the failing repository to be skipped, if it is unavailable.
        Note that yum will try to contact the repo. when it runs most commands,
        so will have to try and fail each time (and thus. yum will be be much
        slower). If it is a very temporary problem though, this is often a nice
        compromise:
            yum-config-manager --save --setopt=ol7_UEKR4.skip_if_unavailable=true
failure: repodata/repomd.xml from ol7_UEKR4: [Errno 256] No more mirrors to try.
http://yum.oracle.com/repo/Oracl ... epodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error"


解决办法:

[root@rac02 yum.repos.d]# rm  public-yum-ol7.repo
[root@rac02 yum.repos.d]# ls
mnt.repo

[root@rac02 yum.repos.d]# yum makecache   (建立缓存)
已加载插件:langpacks, ulninfo
iso                                                                                                         | 3.6 kB  00:00:00     
mnt                                                                                                         | 3.6 kB  00:00:00     
元数据缓存已建立


[root@rac02 ~]# yum install -y  binutils compat*  elfutils-libelf elfutils-libelf-devel  glibc glibc-common  glibc-devel gcc gcc-c++ libaio libgcc  libstdc++ libstdc++-devel make sysstat unixODBC-devel libaio-devel已加载插件:langpacks, ulninfo
软件包 binutils-2.25.1-22.base.el7.x86_64 已安装并且是最新版本
软件包 compat-opensm-libs-3.3.15-2.el7.x86_64 已安装并且是最新版本
软件包 compat-db-headers-4.7.25-28.el7.noarch 已安装并且是最新版本
软件包 compat-libxcb-1.9-1.el7.x86_64 已安装并且是最新版本
软件包 compat-libgnome-desktop3-7-3.8.4-2.el7.x86_64 已安装并且是最新版本
软件包 compat-libpackagekit-glib2-16-0.8.9-1.el7.x86_64 已安装并且是最新版本
软件包 compat-gcc-44-c++-4.4.7-8.el7.x86_64 已安装并且是最新版本
软件包 compat-libcolord1-1.0.4-1.el7.x86_64 已安装并且是最新版本
软件包 compat-libcogl12-1.14.0-3.el7.x86_64 已安装并且是最新版本
软件包 compat-libtiff3-3.9.4-11.el7.x86_64 已安装并且是最新版本
软件包 1:compat-glibc-2.12-4.el7.x86_64 已安装并且是最新版本
...............................................................................


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-26 20:32 , Processed in 0.098081 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表