报错信息
[root@python ~]# lsb_release -a
bash: lsb_release: command not found
问题原因
- 显而易见,未安装 lsb_release 这个命令
解决方法
- 使用 yum 进行安装 lsb_release
- 查看 lsb_release 命令属于哪个软件包
[root@python ~]# yum provides */lsb_release
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
redhat-lsb-core-4.1-27.el7.centos.1.i686 : LSB Core module support
源 :base
匹配来源:
文件名 :/usr/bin/lsb_release
redhat-lsb-core-4.1-27.el7.centos.1.x86_64 : LSB Core module support
源 :base
匹配来源:
文件名 :/usr/bin/lsb_release
redhat-lsb-core-4.1-27.el7.centos.1.x86_64 : LSB Core module support
源 :zh
匹配来源:
文件名 :/usr/bin/lsb_release
可以看到,属于 redhat-lsb 这个包,那么使用yum安装这个包
[root@python ~]# yum -y install redhat-lsb-core-4.1-27.el7.centos.1.x86_64
测试
[root@python ~]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core
博客围绕 lsb_release 提示命令不存在的问题展开。指出问题原因是未安装该命令,解决方法是使用 yum 安装,先查看 lsb_release 所属软件包为 redhat - lsb,再用 yum 安装此包,最后还提及了测试。

1141

被折叠的 条评论
为什么被折叠?



