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. 配置虚拟机 Linux 静态IP

    一.查看IP.子网掩码.网关 虚拟网络编辑器 NAT中获取 取消勾选DHCP 二.查看DNS 虚拟机DNS与Windows设置相同 三.配置linux [root@lhs800 ~]# vi /etc ...

  2. 虚拟节点操作——DocumentFragment

    文章中转站: DocumentFragment对象 createDocumentFragment()用法总结 深入理解DOM节点类型第四篇——文档片段节点DocumentFragment

  3. 委托(作用:解耦),lambda的演化

    1.了解委托 MyDelegate类代码如下: using System; using System.Collections.Generic; using System.Linq; using Sys ...

  4. TMS 控件测试

    //TMS 控件测试nxflpnl1: TNxFlipPanel; 控件 有一个标题的panel 可以随意收展 TNxBusy; 有很均匀分布的四块区域,但是不像 TFlowPanel nxhtmlb ...

  5. LightOJ - 1245 Harmonic Number (II) 求同值区间的和

    题目大意:对下列代码进行优化 long long H( int n ) {    long long res = 0;    for( int i = 1; i <= n; i++ )      ...

  6. JS调用函数时候加括号与只写函数名字的区别 fn与fn()的区别

    经常见插件里面函数调用的时候只写个函数名字,不写函数参数,甚至连括号也不写,比如说: <!DOCTYPE html> <html> <head> <meta ...

  7. 原生js的开发笔记

    1.基本的dom操作 var a=document.getElementById('ma1').innerHTML;/获取html代码 alert(document.getElementById('m ...

  8. 无法修改linux/ubuntu密码(Authentication token manipulation error )问题解决过程【转】

    转自:https://blog.csdn.net/caizi001/article/details/38659189 Vmware虚拟机里的ubunut系统长期不用,密码忘记了,无奈只能通过slax ...

  9. AUTOML --- Machine Learning for Automated Algorithm Design.

    自动算法的机器学习: Machine Learning for Automated Algorithm Design. http://www.ml4aad.org/ AutoML——降低机器学习门槛的 ...

  10. boost::function 介绍

    本片文章主要介绍boost::function的用法. boost::function 就是一个函数的包装器(function wrapper),用来定义函数对象. 1.  介绍 Boost.Func ...