红旗linux yum,更换红旗Linux: Asianux的yum源为网易源

news/2024/7/3 2:34:39

测试环境:

Linux系统版本Asianux4_x64:Linux localhost.localdomain 2.6.32-279.2.1.el6.x86_64 #1 SMP Tue Aug 14 11:42:24 CST 2012 x86_64 x86_64 x86_64 GNU/Linux

本质上Asianux4_x64就是基于Redhat6企业版的。

出现问题:

安装完系统之后,想通过yum安装一些程序,但是提示错误:

Loaded plugins: axtu-plugin, refresh-packagekit, security

Please register, or you can not connect to Asianux Update Server!

Setting up Install Process

No package gcc available.

Error: Nothing to do

以上的错误提示我们必须先注册,否则无法连接到Asianux的yum服务器。

那么我们不注册,怎么更换yum源为可以直接使用的网易yum源呢?

解决方案:

1. 卸载Asianux自带的yum源

[root@localhost 桌面]# rpm -aq | grep yum | xargs rpm -e --nodeps

[root@localhost 桌面]# whereis yum

yum: /etc/yum

[root@localhost 桌面]# rm -rf /etc/yum

2. 下载yum安装包

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

从这个地址中下载需要的包:

python-iniparse-0.3.1-2.1.el6.noarch.rpm

yum-3.2.29-60.el6.centos.noarch.rpm

yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

yum-plugin-fastestmirror-1.1.30-30.el6.noarch.rpm

如果不是通过浏览器找到具体文件下载,可以通过wget下载。

3. 安装yum的相关rpm包

[root@localhost myself]# rpm -ivh python*

warning: python-iniparse-0.3.1-2.1.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

1:python-iniparse        ########################################### [100%]

[root@localhost myself]# rpm -ivh yum*

warning: yum-3.2.29-69.el6.centos.noarch.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY

Preparing...                ########################################### [100%]

1:yum-metadata-parser    ########################################### [ 33%]

2:yum-plugin-fastestmirro########################################### [ 67%]

3:yum                    ########################################### [100%]

[root@localhost myself]#

4. 配置网易源

如果 /etc/yum.repos.d/rhel-debuginfo.repo 这个文件存在的话就备份一下:

[root@localhost myself]# mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.bak

如果本来就没有,就新建:

[root@localhost myself]# touch /etc/yum.repos.d/rhel-debuginfo.repo

编辑新建的文件,加入网易源:

[root@localhost myself]# vim /etc/yum.repos.d/rhel-debuginfo.repo

[base]

name=CentOS-$releasever - Base

baseurl=http://mirrors.163.com/centos/6/os/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-$releasever - Updates

baseurl=http://mirrors.163.com/centos/6/updates/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#packages used/produced in the build but not released

#[addons]

#name=CentOS-$releasever - Addons

#baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/

#gpgcheck=1

#gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

baseurl=http://mirrors.163.com/centos/6/extras/$basearch/

gpgcheck=1

gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/

gpgcheck=1

enabled=0

保存退出编辑器即可。

5. 清理缓存

[root@localhost myself]# yum clean all

已加载插件:fastestmirror

Cleaning repos: base extras updates

清理一切

6. 将服务器上的软件包信息缓存到本地,以提高搜索安装软件的速度

[root@localhost 桌面]# yum makecache

已加载插件:fastestmirror

Determining fastest mirrors

base                                                     | 3.7 kB     00:00

base/group_gz                                            | 219 kB     00:01

base/filelists_db                                        | 6.3 MB     01:40

base/primary_db                                          | 4.6 MB     01:06

base/other_db                                            | 2.8 MB     00:40

extras                                                   | 3.4 kB     00:00

extras/filelists_db                                      |  30 kB     00:00

extras/prestodelta                                       |  601 B     00:00

extras/primary_db                                        |  27 kB     00:00

extras/other_db                                          |  30 kB     00:00

updates                                                  | 3.4 kB     00:00

updates/filelists_db                                     | 1.0 MB     00:14

updates/prestodelta                                      |  93 kB     00:01

updates/primary_db                                       | 1.3 MB     00:19

updates/other_db                                         |  15 MB     03:43

元数据缓存已建立

至此,网易yum源已经安装成功。


http://lihuaxi.xjx100.cn/news/239135.html

相关文章

15. Python 函数

1. 函数的写法,函数的调用【函数的一般形式】定义一个函数要有以下规则:(1)函数代码块以 def 关键词开头,后接函数标识符名称和小括号();(2)任何传入参数和自…

glib 2.0 arm linux,glib源码安装使用方法

glib库是GTK和GNOME工程的基础底层核心程序库,是一个综合用途的实用的轻量级的C程序库,它提供C语言的常用的数据结构的定义、相关的处理函数,有趣而实用的宏,可移植的封装和一些运行时机能,如事件循环、线程、动态调用…

解除微信回调的Activity必须在包名.wxapi下的限制

很久以前写过一篇文章:Android打包之多版本、多环境、多渠道。里面主要提到了将测试环境和正式环境的包分成不同的包名,同时安装在手机上,以便我们调试。同时,通过manifest的占位符,动态替换icon和label,让…

二次开发photoshop_Photoshop 101:Web开发人员简介

二次开发photoshop介绍 (Introduction) Often, when working as web developer, we need to integrate templates. They can be from Photoshop or other software. In this article, we will have a look at the basics of Photoshop for web developers.通常,在作…

基于web创建逼真的3D图形 | CSS技巧

在成为一名web开发者之前,我从事于视觉设计行业,创造屡获殊荣,电影和电视节目等高端3D效果,例如 Tron, The Thing, Resident Evil,和 Vikings 。为了能够创造这些效果,我们需要使用高度复杂的动画软件,例如…

linux error log 换行,日志提示

日志提示线上问题,需要看日志。控制台可以打印Mybatis操作的SQL语句。开发流程:第一步:加入依赖image.png第二步:在项目的resources中加入log4j属性文件image.png第三步:演示image.png扩展了解一、日志概念的介绍Log4j…

快速 开发平台 架构_快速介绍清洁架构

快速 开发平台 架构by Daniel Deutsch由Daniel Deutsch 快速介绍清洁架构 (A quick introduction to clean architecture) In an open source project I started to contribute to, the concept of “clean architecture” was brought to me.在一个我开始参与的开源项目中 &a…

安装Python的wx库

2019独角兽企业重金招聘Python工程师标准>>> 遇到问题1:pip不是内部或外部命令,也不是可运行的程序 解决办法:修改环境变量:变量值改为:C:\Python27\;C:\Python27\Scripts; 遇到问题2:wxPython.…