[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# 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‘
[[email protected] ~]# 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‘
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
[[email protected] ~]# rpm -qa |grep yum
[[email protected] ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
--02:30:56-- http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
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.
[[email protected] ~]# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
--02:33:37-- http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-4.el5.x86_64.rpm
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]
[[email protected] ~]# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
--02:34:30-- http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
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]
[[email protected] ~]# wget http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
--02:34:57-- http://centos.ustc.edu.cn/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
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]
[[email protected] ~]# 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
[[email protected] ~]# 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
[[email protected] ~]# rpm -qa|grep yum
[[email protected] ~]# 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
[[email protected] ~]# rim yum-.rpm
bash: rim: command not found
[[email protected] ~]# rm yum-*.rpm
rm: remove regular file yum-3.2.22-40.el5.centos.noarch.rpm‘? y <br/>rm: remove regular file
yum-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/>[[email protected] ~]# ls <br/>anaconda-ks.cfg Desktop install.log install.log.syslog <br/>[[email protected] ~]# 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]
[[email protected] ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm
--02:38:59-- http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-4.el5.i386.rpm
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]
[[email protected] ~]# wget http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
--02:39:18-- http://centos.ustc.edu.cn/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
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]
[[email protected] ~]# pm -ivh yum-
bash: pm: command not found
[[email protected] ~]# 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%]
[[email protected] ~]# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
--02:40:08-- http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo
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]
[[email protected] ~]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
Metadata Cache Created
注意:如果遇到没签名的程序,但你确定它是安全的,此时可以添加--nogpgcheck参数。
原文地址:http://blog.51cto.com/jack88/2095607