解决Centos/Redhat,命令不存在

[root@26 ~]# lsb_release                    #不存在
-bash: lsb_release: command not found    
[root@26 ~]# yum provides */lsb_release           #查询命令的依赖rpm包
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
mvpbang | 4.0 kB 00:00 ...
redhat-lsb-core-4.0-7.el6.centos.i686 : LSB base libraries support for CentOS
Repo : mvpbang
Matched from:
Filename : /usr/bin/lsb_release

 

redhat-lsb-core-4.0-7.el6.centos.x86_64 : LSB base libraries support for CentOS
Repo : mvpbang
Matched from:
Filename : /usr/bin/lsb_release

 

[root@26 ~]# yum install -y redhat-lsb-core     #安装提示的依赖包
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
redhat-lsb-core x86_64 4.0-7.el6.centos mvpbang 25 k

Transaction Summary
================================================================================
Install 1 Package(s)

Total download size: 25 k
Installed size: 22 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : redhat-lsb-core-4.0-7.el6.centos.x86_64 1/1
Verifying : redhat-lsb-core-4.0-7.el6.centos.x86_64 1/1

Installed:
redhat-lsb-core.x86_64 0:4.0-7.el6.centos

Complete!
[root@26 ~]# lsb_release                        #命令可以执行!!!
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
[root@26 ~]#

posted @ 2016-12-13 21:48  mvpbang  阅读(2173)  评论(0编辑  收藏  举报