yum安装命令常见错误

安装route命令却提示错误

[root@oldboy ~]# yum -y install route
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
No package route available.
Error: Nothing to do

解决

1,检查命令属于哪个软件包


yum安装命令常见错误_第1张图片
image.png

2.检查是否安装完成

[root@oldboy ~]# rpm -qa |grep net-tools
net-tools-2.0-0.24.20131004git.el7.x86_64

安装tree命令却提示

[root@nfs01 ~]# yum install -y tree
Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 12494.
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  25 M RSS (420 MB VSZ)
    Started: Sat May 18 21:39:42 2019 - 00:28 ago
    State  : Sleeping, pid: 12494
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  25 M RSS (420 MB VSZ)
    Started: Sat May 18 21:39:42 2019 - 00:30 ago
    State  : Sleeping, pid: 12494
Another app is currently holding the yum lock; waiting for it to exit...
  The other application is: yum
    Memory :  25 M RSS (420 MB VSZ)
    Started: Sat May 18 21:39:42 2019 - 00:32 ago
    State  : Sleeping, pid: 12494

Existing lock /var/run/yum.pid: another copy is running as pid 12541.
yum被占用,占用的进程pid是12541
每个进程都有自己1个pid号码,同一时间只能运行一个yum命令。

解决:使用用kill命令就可以把进程杀死

你可能感兴趣的:(yum安装命令常见错误)