无法为RHEL 5安装或更新redhat-lsb软件包

时间:2014-07-10 12:54:13

标签: linux redhat rhel rhel5 lsb

我将守护程序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 (mockbuild@hs20-bc1-7.build.redhat.com) (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
  • 红帽-LSB-3.1-12.3.EL.src.rpm
  • redhat-lsb-3.1-12.3.EL.x86_64.rpm
  • 红帽-LSB-4.0-2.1.4.el5.i386.rpm
  • redhat-lsb-4.0-2.1.4.el5.src.rpm
  • 红帽-LSB-4.0-2.1.4.el5.x86_64.rpm

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

使用以下参数RPMs:

- F强制安装packege

--replacepkgs:安装软件包,即使其中某些软件包已经安装在此系统上。

--nodeps:在安装或升级软件包之前不要进行依赖性检查

使用此命令可解决此类错误: