yum 安装 firefox 错误 - libnssutil3.so

yum install firefox error - libnssutil3.so

我在 installing/listing firefoxpython Linux 服务器。任何解决方法的想法。

# yum install firefox
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /usr/lib64/libnssutil3.so: undefined symbol: PL_ClearArenaPool

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.4.3 (#1, Oct 23 2012, 22:02:41)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-54)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq

而不是为 firefox -version 命令获取以下 output/value。

$ firefox --version
Mozilla Firefox 17.0.9

我得到:

XPCOMGlueLoad error for file /opt/firefox/libxpcom.so:
libxul.so: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

python -h 命令输出看起来有效。
python -V 显示:

Python 2.4.3

当我进行 运行 Selenium 测试(需要 firefox 和 Xvfb)时,出现以下错误:

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
XPCOMGlueLoad error for file /opt/firefox/libxpcom.so:
libxul.so: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
XPCOMGlueLoad error for file /opt/firefox/libxpcom.so:
libxul.so: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

问题不在于python,而是LD_LIBRARY_PATH不包含/lib64和/usr/lib64设置值。我们通过将 /lib64:/usr/lib64 前置到 LD_LIBRARY_PATH.

来解决这个问题
export LD_LIBRARY_PATH=/usr/lib64/:/lib64:$LD_LIBRARY_PATH

在这一点之后,当我执行 yum help 或 yum install firefox 时(它没有给出上述错误)但是:

firefox --version 还是报错:

XPCOMGlueLoad error for file /opt/firefox/libxpcom.so:
libxul.so: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

现在,我终于 运行 yum install firefox 安装了一堆组件,最后说:

  Installing     : alsa-lib                                                                                                                                                                                                  20/23
  Installing     : xulrunner                                                                                                                                                                                                 21/23
  Installing     : firefox                                                                                                                                                                                                   22/23
  Installing     : firefox                                                                                                                                                                                                   23/23

Installed:
  firefox.i386 0:17.0.9-1.el5_9                                                                                   firefox.x86_64 0:17.0.9-1.el5_9

Dependency Installed:
  GConf2.i386 0:2.14.0-9.el5        ORBit2.i386 0:2.14.3-5.el5   alsa-lib.i386 0:1.0.17-1.el5      atk.i386 0:1.12.2-1.fc6        avahi.i386 0:0.6.16-10.el5_6 avahi-glib.i386 0:0.6.16-10.el5_6 cairo.i386 0:1.2.4-5.el5
  cups-libs.i386 1:1.3.7-30.el5_9.3 gamin.i386 0:0.1.7-10.el5    gnome-vfs2.i386 0:2.16.2-12.el5_9 gnutls.i386 0:1.4.1-10.el5_9.2 gtk2.i386 0:2.10.4-29.el5    libIDL.i386 0:0.8.7-1.fc6         libXcursor.i386 0:1.1.7-1.2
  libXfixes.i386 0:4.0.1-2.1        libXinerama.i386 0:1.0.1-2.1 libXrandr.i386 0:1.1.1-3.3        libacl.i386 0:2.2.39-8.el5     libattr.i386 0:2.4.32-1.1    pango.i386 0:1.14.9-8.el5_7.3     xulrunner.i386 0:17.0.9-1.el5_9

Complete!

现在 firefox 版本显示正确。

firefox --version

Mozilla Firefox 17.0.9

现在一切正常。