博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Linux下安装yum工具
阅读量:5935 次
发布时间:2019-06-19

本文共 9891 字,大约阅读时间需要 32 分钟。

[root@localhost ~]# yum -y install fonts-chinese

Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package fonts-chinese available.
Nothing to do
[root@localhost ~]# yum update
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Skipping security plugin, no data
Setting up Update Process
Skipping security plugin, no data
Skipping security plugin, no data
No Packages marked for Update
[root@localhost ~]# yum install
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Error: Need to pass a list of pkgs to install
usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, list-security, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update, list-sec, list, remove, info-sec, clean, info-security, grouperase >

options:

-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
-e [error level] error output level
-q, --quiet quiet operation
-v, --verbose verbose operation
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--disableexcludes=[repo]
disable exclude from main, for a repo or for
everything
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
--nogpgcheck disable gpg signature checking
--disableplugin=[plugin]
disable plugins by name
--security Include security relevant packages
--cve=CVE Include packages needed to fix the given CVE
--bz=BZ Include packages needed to fix the given BZ
--advisory=ADVISORY Include packages needed to fix the given advisory
[root@localhost ~]# yum -versioin
Loading "rhnplugin" plugin
Loading "security" plugin
usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update, list, remove, clean, grouperase >

Command line error: option -e: invalid integer value: 'rsioin'

[root@localhost ~]# yum -version
Loading "rhnplugin" plugin
Loading "security" plugin
usage: yum [options] < grouplist, localinstall, groupinfo, localupdate, resolvedep, erase, deplist, groupremove, makecache, upgrade, provides, shell, install, whatprovides, groupinstall, update, repolist, groupupdate, info, search, check-update, list, remove, clean, grouperase >

Command line error: option -e: invalid integer value: 'rsion'

[root@localhost ~]# yum install yum-fastestmirror
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package yum-fastestmirror available.
Nothing to do
[root@localhost ~]# yum install httpd
Loading "rhnplugin" plugin
Loading "security" plugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
No package httpd available.
Nothing to do
[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
[root@localhost ~]# rpm -qa |grep yum
[root@localhost ~]# wget
--02:30:56--
Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110
Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
02:30:56 ERROR 404: Not Found.

[root@localhost ~]# wget

--02:33:37--
Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110
Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26027 (25K) [application/x-redhat-package-manager]
Saving to: `yum-metadata-parser-1.1.2-4.el5.x86_64.rpm'

100%[=======================================>] 26,027 --.-K/s in 0.06s

02:33:37 (406 KB/s) - `yum-metadata-parser-1.1.2-4.el5.x86_64.rpm' saved [26027/26027]

[root@localhost ~]# wget

--02:34:30--
Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110
Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21033 (21K) [application/x-redhat-package-manager]
Saving to: `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm'

100%[=======================================>] 21,033 --.-K/s in 0.06s

02:34:30 (332 KB/s) - `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm' saved [21033/21033]

[root@localhost ~]# wget

--02:34:57--
Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110
Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1034960 (1011K) [application/x-redhat-package-manager]
Saving to: `yum-3.2.22-40.el5.centos.noarch.rpm'

100%[=======================================>] 1,034,960 848K/s in 1.2s

02:34:58 (848 KB/s) - `yum-3.2.22-40.el5.centos.noarch.rpm' saved [1034960/1034960]

[root@localhost ~]# rpm -ivh yum-

warning: yum-3.2.22-40.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
libc.so.6()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libc.so.6(GLIBC_2.2.5)(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libglib-2.0.so.0()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libm.so.6()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libpthread.so.0()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libsqlite3.so.0()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libxml2.so.2()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
libz.so.1()(64bit) is needed by yum-metadata-parser-1.1.2-4.el5.x86_64
[root@localhost ~]# file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
[root@localhost ~]# rpm -qa|grep yum
[root@localhost ~]# ls
anaconda-ks.cfg yum-3.2.22-40.el5.centos.noarch.rpm
Desktop yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
install.log yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
install.log.syslog
[root@localhost ~]# rim yum-
.rpm
bash: rim: command not found
[root@localhost ~]# rm yum-*.rpm
rm: remove regular file yum-3.2.22-40.el5.centos.noarch.rpm'? y <br/>rm: remove regular fileyum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm'? y
rm: remove regular file yum-metadata-parser-1.1.2-4.el5.x86_64.rpm'? y <br/>[root@localhost ~]# ls <br/>anaconda-ks.cfg Desktop install.log install.log.syslog <br/>[root@localhost ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm <br/>--02:38:42-- http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm <br/>Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110 <br/>Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected. <br/>HTTP request sent, awaiting response... 200 OK <br/>Length: 1034960 (1011K) [application/x-redhat-package-manager] <br/>Saving to:yum-3.2.22-40.el5.centos.noarch.rpm'

100%[=======================================>] 1,034,960 1.07M/s in 0.9s

02:38:43 (1.07 MB/s) - `yum-3.2.22-40.el5.centos.noarch.rpm' saved [1034960/1034960]

[root@localhost ~]# wget

--02:38:59--
Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110
Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26164 (26K) [application/x-redhat-package-manager]
Saving to: `yum-metadata-parser-1.1.2-4.el5.i386.rpm'

100%[=======================================>] 26,164 --.-K/s in 0.06s

02:38:59 (453 KB/s) - `yum-metadata-parser-1.1.2-4.el5.i386.rpm' saved [26164/26164]

[root@localhost ~]# wget

--02:39:18--
Resolving centos.ustc.edu.cn... 202.141.160.110, 2001:da8:d800:95::110
Connecting to centos.ustc.edu.cn|202.141.160.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21033 (21K) [application/x-redhat-package-manager]
Saving to: `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm'

100%[=======================================>] 21,033 --.-K/s in 0.06s

02:39:19 (331 KB/s) - `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm' saved [21033/21033]

[root@localhost ~]# pm -ivh yum-

bash: pm: command not found
[root@localhost ~]# rpm -ivh yum-
warning: yum-3.2.22-40.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:yum-metadata-parser ########################################### [ 33%]
2:yum-fastestmirror ########################################### [ 67%]
3:yum ########################################### [100%]
[root@localhost ~]# wget
--02:40:08--
Resolving docs.linuxtone.org... 117.79.157.57
Connecting to docs.linuxtone.org|117.79.157.57|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1426 (1.4K) [application/octet-stream]
Saving to: `CentOS-Base.repo'

100%[=======================================>] 1,426 --.-K/s in 0s

02:40:09 (192 MB/s) - `CentOS-Base.repo' saved [1426/1426]

[root@localhost ~]# yum makecache

Loaded plugins: fastestmirror
Determining fastest mirrors
Metadata Cache Created

注意:如果遇到没签名的程序,但你确定它是安全的,此时可以添加--nogpgcheck参数。

转载于:https://blog.51cto.com/jack88/2095607

你可能感兴趣的文章
我的友情链接
查看>>
CentOS 7更改网卡名称
查看>>
Yum软件仓库配置
查看>>
linux 压缩与解压总结
查看>>
mysql脚本1064 - You have an error in your SQL syntax; check the manual
查看>>
nessus 本地扫描(一)
查看>>
linux服务器磁盘陈列
查看>>
交换机配置模式
查看>>
python----tcp/ip http
查看>>
我的友情链接
查看>>
第一本docker书学习笔记1-3章
查看>>
一個典型僵尸網絡淺析
查看>>
vmware克隆Centos6.4虚拟机网卡无法启动问题
查看>>
dba学习
查看>>
asterisk配置
查看>>
GA操作步骤和技巧(二)——用户行为分析
查看>>
shell中while循环里使用ssh的注意事项
查看>>
SHELL获取计算机外网ip的几种写法
查看>>
博客正在搬迁中
查看>>
触发器与存储过程的区别
查看>>