linux  yum源改为阿里yum源

1、备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3、之后运行yum makecache生成缓存

  解决 yum [Errno 256] No more mirrors to try

 输入下面的命令即可解决问题:

                        1.yum clean all         清除yum缓存

2. yum makecache   生成缓存

3. yum update          可更新全部

Centos6.9 yum安装htop报错解决过程

今天在学习linux过程中需要安装htop,但是我在直接yum -y install htop之后,系统提示:

No package htop available.
Error: Nothing to do 
我知道应该是没有安装成功的,但还是抱着侥幸的心理,输入htop命令,系统提示
[root@oldboy ~]# htop
-bash: htop: command not found
至此,最终肯定htop没有安装成功,于是就开始查找没有安装上的原因。
由于htop是一个扩展工具,是一个强大的进程管理前端工具,一般在centos系统源中没有,所以需要去fedora-epel(epel extra packages for enterprises linux 企业级linux扩展软件包)中下载。所以先安装 epel-release 
1、 对应centos版本安装
centos 6 
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

centos7
rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

安装好之后在安装htop ,这次没有报错
yum -y install htop

2、第二个解决办法 
步骤一:yum install -y epel-release 
步骤二:yum install -y htop

安装  lrzsz  用于linux和windows 上传和下载文件

yum -y install lrzsz    上传到linux   #rz  下载到windows #sz  文件名

yum安装软件内容的更多相关文章

  1. Red Hat Enterprise Linux Server(RHEL) yum安装软件时This system is not registered with RHN. RHN support will be disabled. 的解决方法(转)

    新安装了redhat6.5.安装后,登录系统,使用yum update 更新系统.提示: This system is not registered to Red Hat Subscription M ...

  2. centos7使用yum安装软件提示 cannot find a valid baseurl for repo:base/7/x86_64 的解决方法

    由于是本地yum源安装软件,无法联网,因此使用yum安装软件时报了错,解决方法是: 打开vi /etc/resolv.conf文件 新增内容如下: nameserver 8.8.8.8 nameser ...

  3. linux 基本命令___0003 字符串处理和yum安装软件的路径

    字符串变量的处理 参考链接:SHELL字符串处理技巧 计算字符串的字符数量: ${#str} str="xxx-Lane1_S2_L001_R1_trim.fastq" echo ...

  4. 新装CentOS7用yum安装软件提示 cannot find a valid baseurl for repobase7x86_64

    1.打开网络配置文件:vi /etc/sysconfig/network-scripts/ifcfg-ens33(每个机子都可能不一样,但格式会是"ifcfg-e..."). 2. ...

  5. centos使用yum安装软件的时候出现了undefined symbol: CRYPTO_set_locking_callback

    1.问题 在CentOS下使用yum安装软件,结果出现了下面的错误提示: # yum installThere was a problem importing one of the Python mo ...

  6. Linux之保留yum安装软件后的RPM包

    yum安装软件很方便,但是下载下来的rpm包在安装后默认会被删除掉: 如果希望保留yum安装的软件包该如何做呢? 设置方法: 将/etc/yum.conf里对应的keepcache参数改为1即可,然后 ...

  7. CentOS中yum安装软件时报错:No package XXX available

    yum 安装软件时,报错:No package XXX available. [root@localhost ~]# yum -y install redis Loaded plugins: fast ...

  8. yum install错误 系统环境:Oracle Linux5.4 在通过yum安装软件时出现以下错误:

    1.yum配置文件 1 [root@rh168 yum.repos.d]# cat yum.repo  2 [base] 3 name=Oracle linux  4 baseurl=file:/// ...

  9. CentOS下成功挂载xxxxxDVDx.iso并使用yum安装软件

    CentOS下成功挂载xxxxxDVDx.iso并使用yum安装软件 **不断尝试,终能到达彼岸** 测试环境为Win7 32位,VirtualBOx4.2.16+CentOS6.5,可分别到virt ...

随机推荐

  1. v-module绑定vuex里面的数据

    当在严格模式中使用 Vuex 时,在属于 Vuex 的 state 上使用  v-model  会比较棘手: <input v-model="obj.message"> ...

  2. 基于netty实现单聊、群聊功能

    学习资料 https://juejin.im/book/5b4bc28bf265da0f60130116/section/5b6a1a9cf265da0f87595521 收获: 转载 1. Nett ...

  3. 黑马程序员_Java基础视频-深入浅出精华版--PPT 文件列表

    \day01\code\第一章_Java概述.ppt;\day01\resource\资料\50道编程题(有精力的同学看看).doc;\day01\resource\资料\Sun_Java程序员认证考 ...

  4. VGGNet学习——实践

    0 - DataSet http://www.csc.kth.se/~att/Site/Animals.html 1 - Code 1.1 - Import Packages import tenso ...

  5. MySql cmd下的学习笔记 —— 有关建立数据库的操作(连接Mysql,建立数据库,删除数据库等等)

    (01) 连接数据库 mysql -uroot -p 之后输入密码 ******.(由于我的密码设置的是111,所以输入的是111) (02) 退出数据库 exit (03) 查看数据库 show d ...

  6. HashMap、Hashtable、ConcurrentHashMap面试总结

    原文链接:https://www.cnblogs.com/hexinwei1/p/10000779.html 小总结 HashMap.Hashtable.ConcurrentHashMap HashM ...

  7. XE7/X10.2 Datasnap使用 dbExpress 连接MySQL数据库

    本人使用:DELPHI X10.2.2 版本连接 MYSQL 5.1 (安装 mysql-5.1.72-win32.msi)的32位版本,开始连接不了: 将 MYSQL 5.1 安装目录下bin 中的 ...

  8. English常用短语

    (1) be waken  by    被什么吵醒 (2) wake up !           快醒醒 (3)  put the flames    /fleimz/               ...

  9. codeforces 416div.2

        A CodeForces 811A Vladik and Courtesy   B CodeForces 811B Vladik and Complicated Book   C CodeFo ...

  10. codeforces411div.2

    每日CF: 411div2 Solved A CodeForces 805A Fake NP Solved B CodeForces 805B 3-palindrome Solved C CodeFo ...