解决Centos7中-bash: lsb_release: command not found问题

1、问题:

今天在使用lsb_release -a进行系统版本查询的时候,发现报如下错误:lsb_release: command not found.

[root@m src]# lsb_release -a
-bash: lsb_release: command not found

2、安装lsb_release:

需要进行lsb_release的安装,执行yum install -y redhat-lsb

[root@m src]# yum install -y redhat-lsb
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Determining fastest mirrors
docker-ce-stable                                                                                                             | 3.5 kB  00:00:00     
epel                                                                                                                         | 5.3 kB  00:00:00     
extras                                                                                                                       | 2.9 kB  00:00:00     
kubernetes                                                                                                                   | 1.4 kB  00:00:00     
os                                                                                                                           | 3.6 kB  00:00:00     
updates                                                                                                                      | 2.9 kB  00:00:00     
(1/7): epel/7/x86_64/group_gz                                                                                                |  95 kB  00:00:00     
(2/7): kubernetes/primary                                                                                                    |  65 kB  00:00:00     
(3/7): epel/7/x86_64/updateinfo                                                                                              | 1.0 MB  00:00:00     
(4/7): extras/7/x86_64/primary_db                                                                                            | 164 kB  00:00:00     
(5/7): epel/7/x86_64/primary_db                                                                                              | 6.7 MB  00:00:00     
(6/7): updates/7/x86_64/primary_db                                                                                           | 7.6 MB  00:00:01     
(7/7): docker-ce-stable/x86_64/primary_db                                                                                    |  41 kB  00:00:05  

...........省略..................

`Complete!`

出现如上所示,安装成功!

3、查验系统版本

执行lsb_release -a进行查验。

[root@m src]# lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.7.1908 (Core)
Release:	7.7.1908
Codename:	Core

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值