Centos6.5离线安装lsb_release

参考 http://www.linuxfromscratch.org/blfs/view/systemd/postlfs/lsb-release.html
首先在其他电脑下载lsb_release源码
地址 https://downloads.sourceforge.net/lsb/lsb-release-1.4.tar.gz
检验MD5 30537ef5a01e0ca94b7b8eb6a36bb1e4
上传到Centos服务器。

检验MD5

[root@dvs0 dev]# md5sum lsb-release-1.4.tar.gz
30537ef5a01e0ca94b7b8eb6a36bb1e4 lsb-release-1.4.tar.gz

解压

[root@dvs0 dev]# tar -zxvf lsb-release-1.4.tar.gz
[root@dvs0 dev]# cd lsb-release-1.4
[root@dvs0 lsb-release-1.4]#

First fix a minor display problem:

[root@dvs0 lsb-release-1.4]# sed -i "s|n/a|unavailable|" lsb_release

下面开始安装:

[root@dvs0 lsb-release-1.4]# ./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release > lsb_release.1
[root@dvs0 lsb-release-1.4]# install -v -m 644 lsb_release.1 /usr/share/man/man1 &&
> install -v -m 755 lsb_release /usr/bin &&
> install -v -m 755 help2man /usr/bin

安装结果:

`lsb_release.1' -> `/usr/share/man/man1/lsb_release.1'
`lsb_release' -> `/usr/bin/lsb_release'
`help2man' -> `/usr/bin/help2man'

测试lsb_release

[root@dvs0 lsb-release-1.4]# lsb_release -a
LSB Version: unavailable
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final

如果安装第一步提示:

[root@dvs0 lsb-release-1.4]# ./help2man -N --include ./lsb_release.examples --alt_version_key=program_version ./lsb_release > lsb_release.1
-bash: ./help2man: /usr/bin/perl: bad interpreter: No such file or directory

需要安装perl,按照官网提示下载安装即可。
https://www.cpan.org/src/README.html

posted @ 2018-02-02 11:45  水上云天  阅读(1300)  评论(0编辑  收藏  举报