Search code examples
pythonlinuxfirefoxinstallationundefined-symbol

yum install firefox error - libnssutil3.so


I'm getting this error while installing/listing firefox or python on a Linux server. Any ideas how to fix it.

# 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

Instead of getting the following output/value for firefox -version command.

$ firefox --version
Mozilla Firefox 17.0.9

I'm getting:

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 command output looks valid.
python -V shows:

Python 2.4.3

When I'm running Selenium tests (which requires firefox and Xvfb), I get the following error:

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.

Solution

  • The problem is not python, it’s the LD_LIBRARY_PATH that does not include /lib64 and /usr/lib64 setting values. we fixed this by pre-pending /lib64:/usr/lib64 to the LD_LIBRARY_PATH.

    export LD_LIBRARY_PATH=/usr/lib64/:/lib64:$LD_LIBRARY_PATH
    

    After this point, when I did yum help or yum install firefox (it didn't give the above error) BUT:

    firefox --version still gave the error:

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

    Now, I finally ran yum install firefox and it installed bunch of components and at the end said:

      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!
    

    Now firefox version is showing correctly.

    firefox --version

    Mozilla Firefox 17.0.9
    

    Everything is working now.