在xenserver上安装vnc软件时,报错

[root@cloud yum-3.4.3]# ./yummain.py install yum
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>

没有启用的repo源,用命令yum repolist all查看yum镜像源status如下

查看了很多解决方案

参考文章https://blog.csdn.net/juiyy/article/details/52123518修复

主要用了这四步,

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

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

yum clean all
yum makecache

还参考这文章http://www.cnblogs.com/J0der/p/5566610.html继续修复yum源,具体哪一步解决问题了我也不清楚,反正之后就可以成功联网安装package了。

cd /etc/yum.repos.d

mkdir yum.repos.d

wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

估计可能是上面的部分修复了问题。

下面贴上两篇文章https://blog.csdn.net/juiyy/article/details/52123518

xenserver 更新源

https://www.centos.org/download/mirrors/

https://wiki.centos.org/HowTos/CreatePublicMirrors

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

wget http://mirrors.163.com/.help/CentOS7-Base-163.repo

yum clean all
yum makecache

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
 
[base]
name=CentOS-7.2.1511 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.2.1511/os/$basearch/
        http://mirrors.aliyuncs.com/centos/7.2.1511/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/7.2.1511=$releasever&arch=$basearch&repo=os
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-7.2.1511 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.2.1511/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/7.2.1511/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/7.2.1511=$releasever&arch=$basearch&repo=updates
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-7.2.1511 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.2.1511/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/7.2.1511/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/7.2.1511e=$releasever&arch=$basearch&repo=extras
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7.2.1511 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7.2.1511/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/7.2.1511/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/7.2.1511=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

http://www.cnblogs.com/J0der/p/5566610.html

yum指令之修复

折腾着搞openvpn 网站服务器yum指令出了点问题

------------------------------------------------------------

[root@cloud ~]# yum
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Feb 22 2013, 00:00:18) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
http://yum.baseurl.org/wiki/Faq

-----------------------------------------------------------

原因是python版本与yum不兼容.

解决过程:1.准备

[root@cloud ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final

那么系统是CentOS release 6.4 (Final).

[root@cloud ~]# uname -a
Linux cloud 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

那么安装的系统是64位.

2.安装yum程序

先下载所需要的rpm包;

2)下载并安装python-urlgrabber,python-pycurl,yum-metadata-parser(yum需要这三个东西)

centos5 下载地址:http://tel.mirrors.163.com/centos/5/os/x86_64/CentOS/

centos6 下载地址:http://mirrors.163.com/centos/6/os/x86_64/Packages/

使用 wget 下载,然后 rpm -ivh xxx.rpm 安装

3)安装yum

到官网或其他地址下载yum源码包(例如:yum-3.4.3)

wget http://yum.baseurl.org/download/3.4/yum-3.4.3.tar.gz

tar xvf yum-3.4.3.tar.gz

cd yum-3.4.3

./yummain.py install yum

错误又出来了

CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf

其实是因为/etc/yum.conf之前被我删了

那么touch保险下吧 touch /etc/yum.conf

再执行./yummain.py install yum

[root@cloud yum-3.4.3]# ./yummain.py install yum
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>

又是问题。。。坑

没有repo源 又是被我删了的。。。有的话请略过

cd /etc/yum.repos.d

mkdir yum.repos.d

wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

./yummain.py install yum

出现

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Feb 22 2013, 00:00:18) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
http://yum.baseurl.org/wiki/Faq

-----------------------------------

未完待续,问题还没解决....

xenserver 更新源的更多相关文章

  1. 4.修改更新源sources.list,提高软件下载安装速度(提供Kali 2.0 更新源)

    1.切换到root用户(如果已经是root用户就直接看第二步) dnt@HackerKali:~$ su 密码: 2.用文本编辑器打开sources.list,手动添加下面的更新源 root@Hack ...

  2. 修改pip更新源

    修改pip更新源 pip安装时默认访问pypi的,但是pypi的速度对于国内来说有点慢,还在国内也有一些pip的镜像源,造福广大程序员 pipy国内镜像目前有: http://pypi.douban. ...

  3. Ubuntu14.04更新源、安装chrome/搜狗输入法

    目录: 1.更新源 2.安装chrome 3.安装搜狗输入法     1.更新源 三步: cp /etc/apt/sources.list /etc/apt/sources.list_backup   ...

  4. ubuntu 12.04 LTS 如何使用更快的更新源

    装好ubuntu系统后的第一见事就是替换自带的更新源,原因是系统自带的源有些在中国访问不了,可以访问的速度又特别慢.幸好国内的一些公司和大学提供了速度不错的更新源.下面介绍如何使用更快的更新源 方法/ ...

  5. Ubuntu如何选择更新源

    刚装上Ubuntu, 决定先更新一下源. 虽然网上搜索提供了很多更新源,结果替换上实际使用的时候,却发现总是有404无法连接的情况. 后来查查资料,发现Ubuntu自己就提供了很多的源管理. 具体更新 ...

  6. Ubuntu 14.04.4官方默认更新源sources.list

    Ubuntu 14.04.4官方默认更新源sources.list # deb cdrom:[Ubuntu LTS _Trusty Tahr_ - Release amd64 (20160217.1) ...

  7. kali更新源

    原文链接:http://www.cnblogs.com/dunitian/p/4712852.html kali2.0官方下载地址: https://www.kali.org/downloads/ 可 ...

  8. Ubuntu如何更新源

    Ubuntu的源其实就是更新各种软件包需要用到镜像网站, 当大家在虚拟机上安装Linux镜像的时候肯定会遇到各种Linux软件没有安装,当你用apt-get安装的时候它会提示无效的网址,这个时候你就需 ...

  9. ubuntu 12.10 sourcelist软件更新源列表(zz)

        ubuntu 12.10正式版已经发布了,国内各大开源软件源也陆续更新了资源.今天分享一下ubuntu 12.10 软件更新源列表. 首先,备份一下ubuntu 12.04 原来的源地址列表文 ...

随机推荐

  1. TS学习之基础类型

    1.布尔值 let isDone:boolean = false 2.数字(支持二,八,十,十六进制) let width:number = 20 3.字符串 let name:string = &q ...

  2. etcd命令

    etcdctl支持下面列出来的命令,基本上可以分为数据库操作和非数据库操作,可以查看etcdctl README.md来了解更多 ➜ ~ etcdctl -hNAME: etcdctl - A sim ...

  3. 推荐!Html5精品效果源码分享

    一直在看别人的汇总,看到了一些不错的关于 HTML5内容的源码,我也汇总下分享出来,好东西需要共享!希望可以帮到需要的朋友. 1.劲爆分享:HTML5动感的火焰燃烧动画特效 这又是一款基于HTML5的 ...

  4. linux日常管理-系统进程查看工具-ps

    查看系统有那些进程 命令有ps aux 和命令 ps -elf USER  哪个用户使用了这个进程 PID  进程的id %CPU 占用CPU的百分比 %MEM 占用内存的百分比 VSZ 虚拟内存的大 ...

  5. hashcode和equals

    Java中集合(Collection):一类是List另外一类是Set: 区别:list中元素有序,可重复 Set元素无序,不能重复 如何保证元素不重复呢?Object.Equals 但是当添加的元素 ...

  6. C++之queue模板类

    1.queue常用成员函数 ①size() 返回队列中元素的个数 ②empty() 如果队列空则返回真  ③back() 返回最后一个元素引用即队尾. ④front() 返回第一个元素引用即队首. ⑤ ...

  7. /*去hover动画效果*/

    <!DOCTYPE html> /*去hover动画效果*/ <html lang="en"> <head> <meta charset= ...

  8. Android的系统结构简述

    (该图片来自网络) Android系统结构主要分为四层,从上到下依次为,Application层,Application Framework层,lib层,Linux kernel层,下面对这四层进行简 ...

  9. hadoop-2.3.0-cdh5.1.0完全分布式集群配置HA配置

    一.安装前准备: 操作系统:CentOS 6.5 64位操作系统 环境:jdk1.7.0_45以上,本次采用jdk-7u55-linux-x64.tar.gz master01 10.10.2.57  ...

  10. SCSS 中的 &::before 和 &::after

    在看一个文件的时候,发现有&::before 和 &::after, 没有理解怎么用的,因为以前在项目的css文件中,从来没有使用过,也没有见过 网上查询了一下,才发现&::b ...