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. php字符串无乱码截取函数封装

    /** * * 中英混合字符串长度判断 * @param unknown_type $str * @param unknown_type $charset */ function strLength( ...

  2. PHP 设计模式--基础

    设计模式的宗旨就是:重用. 在面向对象中,类是用于生成对象的代码模版,而设计模式是用于解决共性问题的代码模版. 遵循这样的模板,我们可以设快速地设计出优秀的代码. 注意,设计模式只是模板,不是具体的代 ...

  3. Linux内核同步:per_cpu变量

    per cpu变量相关函数和宏 DEFINE_PER_CPU_SHARED_ALIGNED(type,name):静态分配per_cpu数组,数组名为name,结构类型为type DEFINE_PER ...

  4. jQuery如何追加tr到table中 添加到头或者尾

    jQuery 添加新内容有以下四个方法: append() - 在被选元素的结尾插入内容 prepend() - 在被选元素的开头插入内容 after() - 在被选元素之后插入内容 before() ...

  5. [SQL Service]从一张表取值更新另一张表字段

    1. update table_A set  table_A_column = ab.column from table_A aa left join table_B ab on aa.xx = ab ...

  6. Codeforces Round #468 Div. 2题解

    A. Friends Meeting time limit per test 1 second memory limit per test 256 megabytes input standard i ...

  7. 新版本的molar mass(uva-1586)明明debug过了,各种测试还是WA真是气死我了

    #include <bits/stdc++.h> using namespace std; double trans(string a) { stringstream ss; ss< ...

  8. JAVA学习总结-基础语法

    /** * 这篇文章供自己学习JAVA总结回顾使用 * 主要借鉴了马士兵老师的视频进行总结 * @author Kingram */ 标识符的概念和命名规则 JAVA常量---不可变的变量 程序的执行 ...

  9. postgresql数据库部署

    运维开发技术交流群欢迎大家加入一起学习(QQ:722381733) 一.postgresql数据库部署 1.前往postgresql安装包的目录(这里我部署的是10.5的版本) [root@web1 ...

  10. 一篇入门Node.js

    目录 1.Node.js 简介 2.Node.js NPM 3.Node.js 模块 4.Node.js 事件 5.Node.js Buffer 6.Node.js 文件系统 7.Node.js St ...