1 问题描述

新申请了虚拟机, 系统版本是Cent OS 7.2. 在安装软件的过程中, 发现yum命令不能连接到远程仓库, 出现如下提示:

[root@localhost ~]# yum install -y vim
[root@localhost ~]# Error: cannot find a valid baseurl or repo:base/7/x86_64...

2 解决方法一 (Cent OS 7中有效)

(1) 打开文件vi /etc/resolv.conf, 向其中添加一行记录:

# 使用Google的DNS服务, 包括8.8.8.8和8.8.4.4
# 下面2行加入任意一行都可以, 当然2行都加入也

Cent OS 6/7 中通过yum安装软件时提示cannot find a valid baseurl...的解决方法的更多相关文章

  1. 安装JDK时提示 IllegalArgumentException:Invalid characters in hostname的解决方法

    今天在windows7_x64上安装JDK的时候提示IllegalArgumentException:Invalid characters in hostname, 解决方法: 1.打开[控制面板\系 ...

  2. Linux安装软件时缺少依赖包的简单较完美解决方法!

    大家在linux下源码安装时,有木有经常碰到缺少这个包那个包的,然后不知所措?看到最近有几个筒子安装thrift,安装python因缺少依赖包而进行不下去了.我用的是红帽,装系统的时候习惯把所有的有的 ...

  3. 编译安装php时提示Cannot find MySQL header files的解决方法

    php的配置文件中有一行--with-mysql=/usr/local/mysql ,安装的时候提示:configure: error: Cannot find MySQL header files ...

  4. 使用YUM安装软件时提示PackageKit睡眠中解决方法!

    报错如图所示: 解决方法一:移除var/run/yum.pid文件 方法二:直接杀掉进程号 报错的时候会跟进程号 直接利用kill   -9  +进程号

  5. yum安装软件时提示软件包没有签名

    yum install [XXX] -y --nogpgcheck

  6. yum安装软件时,出现"No package XXX available"的解决办法

    第一种: 依次执行以下命令解决 1,cd /home 2,wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noa ...

  7. 安装cuda时 提示toolkit installation failed using unsupported compiler解决方法

    在安装cuda的时候,有时候会提示toolkit installation failed using unsupported compiler.这是因为GCC版本不合适所导致的. 解决的方法很简单,直 ...

  8. 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 ...

  9. 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:/// ...

随机推荐

  1. C# Request

    string type = Request["type"]; //值为null; //?type= 值为""; //?type=12 值为"12&qu ...

  2. C# 后台按键 视频播放器 全屏后无法 触发

    第一种  (全屏不可触发) protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Win ...

  3. js 字符串,数组扩展

    console.log(Array.prototype.sort)//ƒ substring() { [native code] } console.log(String.prototype.subs ...

  4. js兼用性

    1.document.formName.item("itemName") 问题 说明:IE下,可以使用document.formName.item("itemName&q ...

  5. Sessions共享技术设计

    概述 分布式session是实现分布式部署的前提, 当前项目由于历史原因未实现分布式session, 但是由于在kubernets中部署多个pod时, 负载均衡的调用链太长, 导致会话不能保持, 所以 ...

  6. Python - 三大器 迭代器,生层器,装饰器

    目录 Python - 三大器 迭代器,生层器,装饰器 一. 容器 二. 可迭代对象(iterable) 三. 迭代器 四. 生成器 五. 装饰器 1. 定义 六. 闭包 Python - 三大器 迭 ...

  7. 第八节:numpy之四则运算与逻辑运算

  8. Java 注解之总结

    注解是Spring和Mybatis框架所大量使用的技术,要想掌握框架相关技术,注解是必须要掌握的. 掌握注解的优势: 1.能够读懂别人写的代码,特别是框架相关的代码. 2.本来可能需要很多配置文件,需 ...

  9. poj 1273最大流dinic算法模板

    #include<stdio.h> #include<string.h> #define N 300 #define inf 0x7fffffff #include<qu ...

  10. 洛谷——P2925 [USACO08DEC]干草出售Hay For Sale

    https://www.luogu.org/problem/show?pid=2925 题目描述 Farmer John suffered a terrible loss when giant Aus ...