linux下yum install -y ruby-rdoc的报错

Python012

linux下yum install -y ruby-rdoc的报错,第1张

You could try using --skip-broken to work around the problem

Requires: libtk8.4.so()(64bit) 先安装libtk8.4.so

yum更新源配置文件:/etc/yum.repos.d/CentOS-Base.repo

1. 在修改前先备份该文件

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak

2. 修改更新源配置文件(CentOS6地址,其他版本类似)

vim打开配置文件:

vim /etc/yum.repos.d/CentOS-Base.repo

复制以下内容粘贴到配置文件中进行:

# 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-$releasever - Base

baseurl=http://mirrors.oschina.com/centos/$releasever/os/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[updates]

name=CentOS-$releasever - Updates

baseurl=http://mirrors.oschina.com/centos/$releasever/updates/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[addons]

name=CentOS-$releasever - Addons

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

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[extras]

name=CentOS-$releasever - Extras

baseurl=http://mirrors.oschina.com/centos/$releasever/extras/$basearch/

gpgcheck=1

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

[centosplus]

name=CentOS-$releasever - Plus

baseurl=http://mirrors.oschina.com/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-6

最后保存配置文件。

3. 更新yum源配置

yum update

yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器。基於RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软体包,无须繁琐地一次次下载、安装。yum提供了查找、安装、删除某一个、一组甚至全部软件包的命令,而且命令简洁而又好记。

1 安装

yum install 全部安装

yum install package1 安装指定的安装包package1

yum groupinsall group1 安装程序组group1

2 更新和升级

yum update 全部更新

yum update package1 更新指定程序包package1

yum check-update 检查可更新的程序

yum upgrade package1 升级指定程序包package1

yum groupupdate group1 升级程序组group1

3 查找和显示

yum info package1 显示安装包信息package1

yum list 显示所有已经安装和可以安装的程序包

yum list package1 显示指定程序包安装情况package1

yum groupinfo group1 显示程序组group1信息yum search string 根据关键字string查找安装包

4 删除程序

yum remove | erase package1 删除程序包package1

yum groupremove group1 删除程序组group1

yum deplist package1 查看程序package1依赖情况

5 清除缓存

yum clean packages 清除缓存目录下的软件包

yum clean headers 清除缓存目录下的 headers

yum clean oldheaders 清除缓存目录下旧的 headers

yum clean, yum clean all (= yum clean packagesyum clean oldheaders) 清除缓存目录下的软件包及旧的headers

比如,要安装游戏程序组,首先进行查找:

#:yum grouplist

可以发现,可安装的游戏程序包名字是”Games and Entertainment“,这样就可以进行安装:

#:yum groupinstall "Games and Entertainment"

所 有的游戏程序包就自动安装了。在这里Games and Entertainment的名字必须用双引号选定,因为Linux下面遇到空格会认为文件名结束了,因此必须告诉系统安装的程序包的名字是“Games and Entertainment”而不是“Games"。