[root@localhost ~]# slb_release -a
bash: slb_release: command not found...

-bash: lsb_release: command not found 就是 lsb_release命令没有安装

通过搜索,找到下面文章,文章中说有更好的方法不推荐,

不推荐的原因:为了装个lsb_release ,就还要装104M的其他依赖包之类的。

bash: lsb_release: command not found错误的解决方法icon-default.png?t=M276https://www.jb51.net/os/RedHat/348898.html先看看这个命令属于哪个软件包:yum provides */lsb_release

可以看出,属于redhat-lsb这个包,那么接着使用yum安装这个包:yum install -y redhat-lsb

[root@localhost ~]# lsb_release  -r
Release:	7.9.2009
[root@localhost ~]# 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.9.2009 (Core)
Release:	7.9.2009
Codename:	Core

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐