symbol lookup error: /usr/lib/ undefined symbol: gzopen64

Bug #151045 reported by Justin Chudgar on 2007-10-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libxml2 (Ubuntu)

Bug Description

Binary package hint: libxml2

When I attempt to launch FireFox, I get the following error:

/usr/lib/firefox/firefox-bin: symbol lookup error: /usr/lib/ undefined symbol: gzopen64

This error with gzopen64 has also occured during a apt-get dist-upgrade, causing me to have to remove and reinstall a number of packages. It can be avoided by using -safe-mode with firefox.

My system is: 2.6.22-12-generic #1 SMP Sun Sep 23 18:11:30 GMT 2007 i686 GNU/Linux.

PerJensen (per-net-es) wrote :
Download full text (3.9 KiB)

When updating yesterday using the kubuntu update something bad happened. It was not apparent at first. Was told to reboot, which I did. A new kernel - 2.6.22-13-386 - had been installed and after a while I was dumped into a shell with no X, my nvidia-glx driver was not working.

ran "aptitude update"
ran "aptitude full-upgrade" with the following results:

pj@nazgul:~$ sudo aptitude full-upgrade
Indlæser pakkelisterne... Færdig
Opbygger afhængighedstræ
Reading state information... Færdig
Læser information om udvidet tilstand
klargører pakketilstande... Færdig
Opbygger database over mærkater... Færdig
Følgende pakker vil blive opgraderet:
  apport capplets-data compiz-gnome evolution gnome-session libgnome2-common libgnomevfs2-common metacity-common
  nautilus-data sun-java6-jre
The following partially installed packages will be configured:
  apport-gtk apport-qt apturl compiz deskbar-applet evince evolution-common evolution-data-server
  evolution-plugins gnome-app-install gnome-control-center gnome-panel gnome-panel-data gnome-user-guide
  language-selector libcamel1.2-10 libebook1.2-9 libecal1.2-7 libedata-book1.2-2 libedata-cal1.2-6
  libedataserverui1.2-8 libexchange-storage1.2-3 libgconf2.0-cil libgnome-vfs2.0-cil libgnome-window-settings1
  libgnome2-0 libgnome2.0-cil libgnomevfs2-0 libgnomevfs2-bin libgnomevfs2-extra libgtkhtml2.0-cil libmetacity0
  libnautilus-extension1 libpanel-applet2-0 libtotem-plparser7 metacity nautilus python-gnome2-extras
  sun-java6-bin sun-java6-jdk sun-java6-plugin synaptic totem totem-mozilla totem-xine ubuntu-desktop ubuntu-docs
10 pakker opgraderet, 0 nyinstalleret, 0 til afinstallering og 0 ikke opgraderet.
Skal hente 0B/12,2MB arkiver. Efter udpakning vil 2011kB blive frigjort.
Vil du fortsætte) [Y/n?]
Skriver information om udvidet tilstand... Færdig
Prækonfigurerer pakker ...
(Læser database... 292051 filer og mapper aktuelt installeret.)
Gør klar til at erstatte sun-java6-jre 6-03-0ubuntu1 (med .../sun-java6-jre_6-03-0ubuntu2_all.deb)...
sun-dlj-v1-1 license has already been accepted
Udpakker erstatning sun-java6-jre...
update-mime-database: symbol lookup error: /usr/lib/ undefined symbol: gzopen64
dpkg: advarsel - gammelt post-removal-script returnerede afslutningsstatus 127
dpkg - forsøger i stedet script fra ny pakke...
update-mime-database: symbol lookup error: /usr/lib/ undefined symbol: gzopen64
and much more of the same, many complaints about "/usr/lib/ undefined symbol: gzopen64"

The gzopen64() is apparently there:
pj@nazgul:~$ strings /usr/lib/ |grep gzopen64

Using objdump I get:
pj@nazgul:~$ objdump -T /usr/lib/ | grep gzopen64
00004040 g DF .text 0000001b Base gzopen64

Listings of /usr/lib:
pj@nazgul:~$ ls -l /usr/lib/libxml2*
lrwxrwxrwx 1 root root 17 2007-10-09 16:39 /usr/lib/ ->
-rw-r--r-- 1 root root 1166856 2007-10-05 10:08 /usr/lib/

pj@nazgul:~$ ls -l /usr/lib/libz*
-rw-r--r-- 1 root root 90566 2007-07-30 04:12 /usr/lib/libz.a
lrwxrwxrwx 1 root root 18 2007-08-31 14:17 /usr/lib/ ->


Justin Chudgar (justinzane) wrote :

Following is the libxml2 problem I mentioned earlier. Same as the one Peter got.

dpkg --configure libgnomevfs2-common
Setting up libgnomevfs2-common (1:2.20.0-0ubuntu3) ...
gconftool-2: symbol lookup error: /usr/lib/ undefined symbol: gzopen64
dpkg: error processing libgnomevfs2-common (--configure):
 subprocess post-installation script returned error exit status 127
Errors were encountered while processing:

Justin Chudgar (justinzane) wrote :

Also causing problems with SPE (Stani's Python Editor). result of "python /usr/share/spe/_spe/ --debug > ~/Desktop/spe-debug.txt" is attached.

PerJensen (per-net-es) wrote :

Fixed !

I removed an old libz from /usr/local/lib and ran ldconfig.

After that 'sudo aptitude full-upgrade' is very busy.

Justin Chudgar (justinzane) wrote :

PerJensen, you are wonderful. Fix worked for me. In my case, it was libz 1.2.3 in /usr/local/lib.


Matthias Klose (doko) wrote :

closing as invalid

Changed in libxml2:
status: New → Invalid
nicholas (nicholas-krutt) wrote :

I ran into the same problem after pushing "cancel" in update-manager. Only after removing /usr/local/lib/libz* was I able to dpkg -i packages untill dpkg --configure -a was able to finnish.

/usr/local/lib/libz* seems like products of the installer, which breaks later if interrupted. delete tem on exit?

Matthias Klose (doko) wrote :

> /usr/local/lib/libz* seems like products of the installer

no, /usr/local is not touched by the installer. either you did install the library there yourself, or it was installed by a third party application. maybe other files / applications may point you to the offending application.

nicholas (nicholas-krutt) wrote :

ok, thanks for clearing that up. Since this is common to a few gutsy upgrades i suspect .. automatix. I installed it to get some multimedia codecs, before I realized there were less intrusive ways of obtaining the desired results. My /usr/local/src is empty, and I believe I haven't installed anything else from source on this box.

Thanks for your follow-up.


Etienne Lepercq (e-guepe) wrote :

I have the same king of problem when compiling an app using a library linked to the symbol gzopen. I am using ubuntu 7.10 gutsy and I tried reinstalling zlib1g and zlib1g-dev, libxml2, xsltproc (which is used by the gimp and linked to the former symbol).
Here are two compilation linking of two different app : first one is a wxwidgets one (very simple, just a window without buttons, etc.. just to track the error)

g++ -o simple `wx-config --libs` ./simple.o main.o
/usr/bin/../lib/ undefined reference to `gzopen64'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [all] Erreur 1

Then The Gimp compilation :

export LANG=C && make
/usr/bin/xsltproc: symbol lookup error: /usr/lib/ undefined symbol: gzopen64

strings /usr/lib/ |grep gzopen64

objdump -T /usr/lib/ | grep gzopen64
00004040 g DF .text 0000001b Base gzopen64

ls -l /usr/lib/libxml2*
-rw-r--r-- 1 root root 1441704 2007-10-05 04:08 /usr/lib/libxml2.a
-rw-r--r-- 1 root root 804 2007-10-05 04:08 /usr/lib/
lrwxrwxrwx 1 root root 17 2007-11-04 09:01 /usr/lib/ ->
lrwxrwxrwx 1 root root 17 2007-11-04 09:01 /usr/lib/ ->
-rw-r--r-- 1 root root 1166856 2007-10-05 04:08 /usr/lib/

Partial copy-paste, see attachment for the whole thing
 ls -l /usr/lib/libz*
-rw-r--r-- 1 root root 90566 2007-07-29 22:12 /usr/lib/libz.a
lrwxrwxrwx 1 root root 15 2007-11-04 08:49 /usr/lib/ ->
lrwxrwxrwx 1 root root 15 2007-11-04 08:47 /usr/lib/ ->
-rw-r--r-- 1 root root 80504 2007-07-29 22:12 /usr/lib/

Maybe you know how to handle this ? I have nothing relevant in /usr/local/lib !

Etienne Lepercq (e-guepe) wrote :

Ok, with a irc chan and a good user, I found and this is not a bug :

ldd /usr/lib/ => (0xffffe000) => /lib/tls/i686/cmov/ (0xb7ec5000)
        [b] => /opt/matlab/bin/glnx86/ (0xb7eb4000)[/b] => /lib/tls/i686/cmov/ (0xb7e8f000) => /lib/tls/i686/cmov/ (0xb7d45000)
        /lib/ (0x80000000)

As you can see, libz is linked to the matlab one (I recently installed it) and this is the cause to my pb... This is the end of 2 days of heavy searches for this problem ! The solution is to unset LD_LIBRARY_PATH for the matlab path and add it just when launching / linking to matlab libraries....

D. Dobrev (dpldobrev) wrote :

If this error is encountered while trying to run MonoDevelop (1.0 on my machine), all that needs to be done is to replace the file (in /home/dimitar/mono-1.9/lib/) with (from /usr/lib).

D. Dobrev (dpldobrev) wrote :

Sorry about the "/home/dimitar/mono-1.9/lib/" path, that's the path on my machine :). By this path I meant "the path where you installed Mono to"/lib.

I'm using (k)ubuntu 8.04 an I get the same problem in firefox:
/usr/lib/firefox-3.0.1/firefox: symbol lookup error: /usr/lib/ undefined symbol: gzopen64

Any ideas?

Miran Gombač (miran-gombac) wrote :

I had the same problem running OpenERP seerver 4.3 on ubuntu server 8.04. Error message when starting openerp server was

Traceback (most recent call last):
  File "", line 68, in <module>
  File "/home/miran/tinyERP-server-4.3/bin/", line 144, in init_logger
    from tools import config
  File "/home/miran/tinyERP-server-4.3/bin/tools/", line 30, in <module>
    from convert import *
  File "/home/miran/tinyERP-server-4.3/bin/tools/", line 43, in <module>
    from lxml import etree
ImportError: /usr/lib/ undefined symbol: gzopen64

After googling a bit I found out that the problem is due to libz library and I located two versions of that library and couple of links:

/usr/lib/ (good one)
/usr/local/lib/ (not containing gzopen64) - which I tested with objdump -T /usr/local/lib/ | grep gzopen64

so I substituted the one in /usr/local/lib with the one form /usr/lib/ and everything worked...

I don't actually know which package brought the faulty libz to the system...

Hope this helps...

take care


Jonathan Blakes (infobiotics) wrote :

Copying a good copy from /usr/lib over the one in /usr/local/lib worked for me. I definitely installed a rogue zlib.

Thanks everyone

Clark Dunson (cdunson) wrote :

Thanks a lot! (My heroes)

FYI both Matlab and Google Earth installed zlib with no gzopen64 in March
on my Ibex system ...

Uh, Could this about a build flag in zlib1.2.3 (-D_LARGEFILE64_SOURCE=1)?
(Both Matlab and Google Earth's versions are

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers