我将守护程序shell脚本从Devian服务器移到了RHEL 5服务器。脚本现在抛出错误:

E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed


脚本中的错误似乎来自这里:

if ! [ -x "/lib/lsb/init-functions" ]; then
        . /lib/lsb/init-functions
else
        echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
        exit 1
fi


但是,当我尝试为RHEL5安装更新版本的lsb-base时,会得到以下信息:

[root@********** tmp]# rpm -ivh redhat-lsb-4.0-2.1.4.el5.i386.rpm
warning: redhat-lsb-4.0-2.1.4.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 192a7d7d
Preparing...                ########################################### [100%]
        file /etc/redhat-lsb/lsb_start_daemon from install of redhat-lsb-4.0-2.1.4.el5.i386 conflicts with file from package redhat-lsb-3.1-12.3.EL.x86_64
        file /usr/share/man/man1/lsb_release.1.gz from install of redhat-lsb-4.0-2.1.4.el5.i386 conflicts with file from package redhat-lsb-3.1-12.3.EL.x86_64
        file /etc/redhat-lsb/lsb_start_daemon from install of redhat-lsb-4.0-2.1.4.el5.i386 conflicts with file from package redhat-lsb-3.1-12.3.EL.i386
        file /usr/sbin/redhat_lsb_trigger.i386 from install of redhat-lsb-4.0-2.1.4.el5.i386 conflicts with file from package redhat-lsb-3.1-12.3.EL.i386
        file /usr/share/man/man1/lsb_release.1.gz from install of redhat-lsb-4.0-2.1.4.el5.i386 conflicts with file from package redhat-lsb-3.1-12.3.EL.i386


当我尝试使用相同版本的redhat-lsb-3.1-12.3.EL.i386.rpm或redhat-lsb-3.1-12.3.EL.x86_64.rpm进行升级时,我得到:

>> rpm -Uvh redhat-lsb-3.1-12.3.EL.x86_64.rpm
>> warning: redhat-lsb-3.1-12.3.EL.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID a7048f8d
Preparing...                ########################################### [100%]
        package redhat-lsb-3.1-12.3.EL.x86_64 is already installed
        file /usr/sbin/redhat_lsb_trigger.x86_64 from install of redhat-lsb-3.1-12.3.EL.x86_64 conflicts with file from package redhat-lsb-3.1-12.3.EL.x86_64
        file /usr/share/man/man1/lsb_release.1.gz from install of redhat-lsb-3.1-12.3.EL.x86_64 conflicts with file from package redhat-lsb-3.1-12.3.EL.x86_64
        file /usr/share/man/man1/lsb_release.1.gz from install of redhat-lsb-3.1-12.3.EL.x86_64 conflicts with file from package redhat-lsb-3.1-12.3.EL.i386


有关系统的信息:

[root@*********** tmp]# cat /proc/version
Linux version 2.6.18-128.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Wed Dec 17 11:41:38 EST 2008
[root@*********** tmp]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.3 (Tikanga)


编辑:
没有安装yum,这就是为什么我没有尝试通过它进行安装的原因。
任何想法?

以下软件包会发生相同的问题:


redhat-lsb-3.1-12.3.EL.i386.rpm
redhat-lsb-3.1-12.3.EL.src.rpm
redhat-lsb-3.1-12.3.EL.x86_64.rpm
redhat-lsb-4.0-2.1.4.el5.i386.rpm
redhat-lsb-4.0-2.1.4.el5.src.rpm
redhat-lsb-4.0-2.1.4.el5.x86_64.rpm

最佳答案

看来您正在尝试为i386体系结构安装RPM,但您的系统是x86_64。尝试安装redhat-lsb-4.0-2.1.4.el5.x86_64.rpm

关于linux - 无法为RHEL 5安装或更新redhat-lsb软件包,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24677114/

10-11 20:50