-1

我将守护进程 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.rpmredhat-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
  • 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
4

2 回答 2

0

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

于 2014-07-10T16:06:10.040 回答
0

在 RPM 中使用以下参数:

- F强制安装packege

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

--nodeps: 在安装或升级包之前不要做依赖检查

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

于 2015-10-04T09:52:25.127 回答