在安装完Fedora20以后,查看系统版本的时候,只能依靠类似cat /proc/version这样的方法。如下
[root@rachel vsftpd]# cat /proc/version
Linux version 3.16.3-200.fc20.x86_64 (mockbuild@bkernel02.phx2.fedoraproject.org) (gcc version 4.8.3 20140624 (Red Hat 4.8.3-1) (GCC) ) #1 SMP Wed Sep 17 22:34:21 UTC 2014
[root@rachel vsftpd]# lsb_release -a
bash: lsb_release: 未找到命令...
对于大处女座的我来说,是不可以接受哒~ 所以誓死要把他鼓叨出来
运行如下命令,查看这个命令到底在哪个包里面。(下面和实际的执行比起来,删除了一些空行)
[root@rachel vsftpd]# yum provides */lsb_release
已加载插件:axelget, fastestmirror, langpacks, refresh-packagekit
..... #yum更新的浮云掠过
dkms-2.2.0.3-20.fc20.noarch : Dynamic Kernel Module Support Framework
源 :fedora
匹配来源:
文件名 :/usr/lib/dkms/lsb_release
dkms-2.2.0.3-28.git.7c3e7c5.fc20.noarch : Dynamic Kernel Module Support
: Framework
源 :updates
匹配来源:
文件名 :/usr/lib/dkms/lsb_release
redhat-lsb-core-4.1-20.fc20.i686 : LSB Core module support
源 :fedora
匹配来源:
文件名 :/usr/bin/lsb_release
redhat-lsb-core-4.1-20.fc20.x86_64 : LSB Core module support
源 :fedora
匹配来源:
文件名 :/usr/bin/lsb_release
redhat-lsb-core-4.1-21.1.fc20.i686 : LSB Core module support
源 :updates
匹配来源:
文件名 :/usr/bin/lsb_release
redhat-lsb-core-4.1-21.1.fc20.x86_64 : LSB Core module support
源 :updates
匹配来源:
文件名 :/usr/bin/lsb_release
[root@rachel vsftpd]#
一部小心检索出来两个包中包含这个命令。而且程序安装目录不同。
先看这两个包 Dynamic Kernel Module Support 查看维基百科的内容《 动态内核模块支持》发现不是。
然后决定安装 LSB Core module support。命令如下及安装过程如下,
[root@rachel vsftpd]# yum -y install redhat-lsb
...... # yum缓存及解决依赖关系的具体过程忽略
依赖关系解决
# PS.看到要装这么多东西,我都要哭了。
===============================================================================
Package 架构 版本 源 大小
===============================================================================
正在安装:
redhat-lsb x86_64 4.1-21.1.fc20 updates 25 k
为依赖而安装:
gdbm-devel x86_64 1.10-7.fc20 fedora 47 k
lcms-libs x86_64 1.19-10.fc20 fedora 104 k
libdb-devel x86_64 5.3.28-1.fc20 fedora 37 k
libmng x86_64 1.0.10-12.fc20 fedora 166 k
libpng12 x86_64 1.2.50-6.fc20 updates 151 k
m4 x86_64 1.4.16-10.fc20 fedora 255 k
mailx x86_64 12.5-10.fc20 fedora 244 k
patch x86_64 2.7.1-7.fc20 fedora 110 k
perl-B-Lint noarch 1.17-291.fc20 fedora 20 k
perl-Business-ISBN noarch 2.06-4.fc20 fedora 27 k
perl-Business-ISBN-Data noarch 20120719.001-4.fc20 fedora 25 k
perl-CGI noarch 3.64-1.fc20 updates 250 k
perl-CPAN noarch 2.00-289.fc20 updates 297 k
perl-Class-ISA noarch 0.36-1012.fc20 fedora 9.1 k
perl-Digest noarch 1.17-291.fc20 fedora 23 k
perl-Digest-MD5 x86_64 2.53-3.fc20 fedora 30 k
perl-Digest-SHA x86_64 1:5.85-5.fc20 updates 58 k
perl-Encode-Locale noarch 1.03-7.fc20 fedora 16 k
perl-Env noarch 1.04-291.fc20 fedora 16 k
perl-ExtUtils-Install noarch 1.59-289.fc20 updates 74 k
perl-ExtUtils-MakeMaker noarch 6.72-3.fc20 updates 277 k
perl-ExtUtils-Manifest noarch 1.63-1.fc20 fedora 31 k
perl-ExtUtils-ParseXS noarch 1:3.18-292.fc20 updates 77 k
perl-FCGI x86_64 1:0.74-10.fc20 fedora 43 k
perl-File-CheckTree noarch 4.42-291.fc20 fedora 18 k
perl-File-Listing noarch 6.04-7.fc20 fedora 13 k
perl-HTML-Parser x86_64 3.71-4.fc20 fedora 115 k
perl-HTML-Tagset noarch 3.20-18.fc20 fedora 18 k
perl-HTTP-Cookies noarch 6.01-7.fc20 fedora 26 k
perl-HTTP-Daemon noarch 6.01-7.fc20 fedora 20 k
perl-HTTP-Date noarch 6.02-8.fc20 fedora 14 k
perl-HTTP-Message noarch 6.06-7.fc20 fedora 82 k
perl-HTTP-Negotiate noarch 6.01-7.fc20 fedora 17 k
perl-IO-HTML noarch 1.001-1.fc20 updates 23 k
perl-LWP-MediaTypes noarch 6.02-4.fc20 fedora 24 k
perl-Locale-Codes noarch 3.26-3.fc20 fedora 312 k
perl-Locale-Maketext noarch 1.25-1.fc20 updates 94 k
perl-Module-Pluggable noarch 1:4.80-292.fc20 updates 29 k
perl-Pod-Checker noarch 1.60-291.fc20 fedora 28 k
perl-Pod-LaTeX noarch 0.61-292.fc20 fedora 36 k
perl-Pod-Parser noarch 1.61-3.fc20 fedora 107 k
perl-Pod-Plainer noarch 1.03-6.fc20 fedora 9.2 k
perl-Sys-Syslog x86_64 0.33-4.fc20 fedora 42 k
perl-Test-Harness noarch 3.28-4.fc20 updates 302 k
perl-Test-Simple noarch 1.001002-1.fc20 fedora 177 k
perl-Text-Soundex x86_64 3.04-291.fc20 fedora 19 k
perl-Text-Unidecode noarch 0.04-21.fc20 fedora 115 k
perl-TimeDate noarch 1:2.30-3.fc20 fedora 52 k
perl-URI noarch 1.60-11.fc20 fedora 107 k
perl-WWW-RobotRules noarch 6.02-8.fc20 fedora 18 k
perl-XML-LibXML x86_64 1:2.0105-1.fc20 fedora 377 k
perl-XML-NamespaceSupport noarch 1.11-12.fc20 fedora 19 k
perl-XML-SAX noarch 0.99-11.fc20 fedora 64 k
perl-XML-SAX-Base noarch 1.08-10.fc20 fedora 33 k
perl-autodie noarch 2.20-4.fc20 fedora 80 k
perl-devel x86_64 4:5.18.2-289.fc20 updates 473 k
perl-libwww-perl noarch 6.05-3.fc20 fedora 205 k
pyparsing noarch 2.0.1-1.fc20 fedora 96 k
qt x86_64 1:4.8.6-10.fc20 updates 4.7 M
qt-settings noarch 20-17.fc20 updates 19 k
qt-x11 x86_64 1:4.8.6-10.fc20 updates 13 M
qt3 x86_64 3.3.8b-58.fc20 updates 3.4 M
redhat-lsb-core x86_64 4.1-21.1.fc20 updates 37 k
redhat-lsb-cxx x86_64 4.1-21.1.fc20 updates 16 k
redhat-lsb-desktop x86_64 4.1-21.1.fc20 updates 20 k
redhat-lsb-languages x86_64 4.1-21.1.fc20 updates 17 k
redhat-lsb-printing x86_64 4.1-21.1.fc20 updates 16 k
redhat-lsb-submod-multimedia x86_64 4.1-21.1.fc20 updates 15 k
redhat-lsb-submod-security x86_64 4.1-21.1.fc20 updates 15 k
spax x86_64 1.5.2-8.fc20 fedora 259 k
ssmtp x86_64 2.64-11.fc20 updates 50 k
systemtap-sdt-devel x86_64 2.6-2.fc20 updates 62 k
事务概要
===============================================================================
安装 1 软件包 (+72 依赖软件包)
总下载量:27 M
安装大小:78 M
...... # 安装过程忽略
完毕!
[root@rachel vsftpd]# lsb_release
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
[root@rachel vsftpd]# 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: Fedora
Description: Fedora release 20 (Heisenbug)
Release: 20
Codename: Heisenbug
[root@rachel vsftpd]#
我是绝对不会告诉你们,当我看完实行结果,我觉得这东西还不如那个cat呢~~