zoukankan      html  css  js  c++  java
  • RedHat无法使用yum源问题

    RedHat下的yum是需要注册才能使用的

    使用的话会提示:

    [root@test ~]# yum clean all
    
    Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
    
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    
    repolist: 0

    我们可以将redhat的yum先卸载然后在重新安装就可以解决。

    1.清除yum的安装包 

    rpm -qa | grep yum | xargs rpm -e --nodeps
    
    rpm -qa |grep python-urlgrabber|xargs rpm -e --nodeps

    2.下载相关的rpm包(下载下面安装的rpm)

      ps:安装的是64位下载的是rpm包,可以用 uname -a 查看系统

    3.安装rpm

    rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
    
    rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
    
    rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
    
    rpm -ivh yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm yum-3.2.29-81.el6.centos.noarch.rpm
    
     ps:yum-plugin-fastestmirror和yum-3.2.29要一起安装,不然会相互依赖,报错!

    4.配置yum的配置文件

    yum使用仓库保存管理rpm软件包,仓库的配置文件保存在/etc/yumrepos.d/目录下(该目录下可能有 .repo文件可以直接配置,没有的话可以自己新增,必须是移.repo结尾)

    此处采用网易的yum源 http://mirrors.163.com/.help/centos.html

    Wget http://mirrors.163.com/.help/CentOS6-Base-163.repo

    需要修改

    sed -i 's#$releasever#6#g' CentOS6-Base-163.repo

    5.检查郁闷安装

    清理yum缓存

    yum clean all
    
    yum makecache
    
    已加载插件:fastestmirror, product-id, search-disabled-repos, subscription-manager
    
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    
    Determining fastest mirrors
    
    base                                                                                                                                         | 3.7 kB     00:00    
    
    base/group_gz                                                                                                                                | 242 kB     00:00    
    
    base/filelists_db                                                                                                                            | 6.4 MB     00:10    
    
    base/primary_db                                                                                                                              | 4.7 MB     00:08    
    
    base/other_db                                                                                                                                | 2.8 MB     00:06    
    
    extras                                                                                                                                       | 3.4 kB     00:00    
    
    extras/filelists_db                                                                                                                          |  24 kB     00:00    
    
    extras/prestodelta                                                                                                                           | 2.2 kB     00:00    
    
    extras/primary_db                                                                                                                            |  29 kB     00:00    
    
    extras/other_db                                                                                                                              |  14 kB     00:00    
    
    updates                                                                                                                                      | 3.4 kB     00:00    
    
    updates/filelists_db                                                                                                                         | 4.0 MB     00:04    
    
    updates/prestodelta                                                                                                                          | 201 kB     00:00    
    
    updates/primary_db                                                                                                                           | 5.7 MB     00:07    
    
    updates/other_db                                                                                                                             | 268 kB     00:00    
    
    元数据缓存已建立
  • 相关阅读:
    leetcode刷题笔记 217题 存在重复元素
    leetcode刷题笔记 二百零六题 反转链表
    leetcode刷题笔记 二百零五题 同构字符串
    20201119日报
    np.percentile 和df.quantile 分位数
    建模技巧
    np.where() 条件索引和SQL的if用法一样,或者是给出满足条件的坐标集合
    np.triu_indices_from() 返回方阵的上三角矩阵的索引
    ax.set_title() 和 plt.title(),以及df,plot(title='')
    信用卡模型(三)
  • 原文地址:https://www.cnblogs.com/FireLL/p/11611187.html
Copyright © 2011-2022 走看看