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. 允许长单词、数字、URL换行到下一行

    CSS3 word-wrap 属性 normal 只在允许的断字点换行(浏览器保持默认处理) break-word 在长单词.数字.URL地址内部进行换行 页面效果图: 源码:

  2. C++ 类使用多线程技术

    参考文章 : http://blog.csdn.net/jmh1996/article/details/72235232 成员函数作为线程函数,  要将成员函数定义为静态的 C++ 静态成员函数调用非 ...

  3. mysql 案例 ~ mysql字符集详解

    一 谈谈mysql常见的字符集问题 二 字符集统一  1 character_set_server  2 character_set_client  3 java/php等连接字符集  4 chara ...

  4. Java开发环境配置(5)--Web 服务器--Tomcat--安装过程遇到的问题

    1.参考例子:--- 怎样安装配置tomcat 8_百度经验https://jingyan.baidu.com/article/ff42efa91132a0c19e220208.html 安装与配置T ...

  5. invalidate和requestLayout

    Invalidate:To farce a view to draw,call invalidate().——摘自View类源码从上面这句话看出,invalidate方法会执行draw过程,重绘Vie ...

  6. shell编程 之 输入输出重定向

    1 输入输出重定向 标准输入:从终端得到命令,对于计算机来说,是从终端获得了命令,执行完了以后,结果和执行状态或者错误提示又会发回终端,这叫标准输出. 输入输出重定向就是从终端以外的别的地方得到输入, ...

  7. EditText设置可以点击,但是不可以编辑

    EditText设置  editText.setEnabled(false);后不可编辑也不可点击 设置  setFocusable(false)后不可编辑,但是再设置 setFocusable(tr ...

  8. [转] pytorch指定GPU

    查过好几次这个命令,总是忘,转一篇mark一下吧 转自:http://www.cnblogs.com/darkknightzh/p/6836568.html PyTorch默认使用从0开始的GPU,如 ...

  9. LSH(Locality Sensitive Hashing)原理与实现

    原文地址:https://blog.csdn.net/guoziqing506/article/details/53019049 LSH(Locality Sensitive Hashing)翻译成中 ...

  10. object oriented programming : class application

    class Thread_Sync; class Critical; class Info; class Info{Info(std::string str):m_info(str){} privat ...