Thread: why can't I load pgxml.sql
1. ./configure --with-libxml --with-libxslt 2. make&&make install (successful) 3. test=# \i /usr/local/pgsql/share/contrib/pgxml.sql error appearance: SET psql:/usr/local/pgsql/share/contrib/pgxml.sql:10: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:15: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:19: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:23: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:27: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:31: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:35: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:41: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:46: ERROR: function xpath_list(text, text, unknown) does not exist LINE 2: AS 'SELECT xpath_list($1,$2,'','')' ^ 提示: No function matches the given name and argument types. You might need to add explicit type casts. psql:/usr/local/pgsql/share/contrib/pgxml.sql:56: ERROR: function xpath_nodeset(text, text, unknown, unknown) does not exist LINE 3: AS 'SELECT xpath_nodeset($1,$2,'''','''')' ^ 提示: No function matches the given name and argument types. You might need to add explicit type casts. psql:/usr/local/pgsql/share/contrib/pgxml.sql:62: ERROR: function xpath_nodeset(text, text, unknown, text) does not exist LINE 3: AS 'SELECT xpath_nodeset($1,$2,'''',$3)' ^ 提示: No function matches the given name and argument types. You might need to add explicit type casts. psql:/usr/local/pgsql/share/contrib/pgxml.sql:69: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:79: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 psql:/usr/local/pgsql/share/contrib/pgxml.sql:86: ERROR: could not load library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: undefined symbol: gzopen64 thanks all. regards.
Yi Zhao <yi.zhao@alibaba-inc.com> writes: > 1. ./configure --with-libxml --with-libxslt > 2. make&&make install (successful) > 3. test=# \i /usr/local/pgsql/share/contrib/pgxml.sql > error appearance: > SET > psql:/usr/local/pgsql/share/contrib/pgxml.sql:10: ERROR: could not load > library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: > undefined symbol: gzopen64 Well, you've still failed to mention most all of the relevant information, like what platform this is and what PG version. But what the above suggests is that libxml2 is linked to a version of libz that doesn't appear anywhere in the dynamic linker's search path. How did you obtain or build libxml2, exactly? If this is a Linux platform, I think you might have missed out a ldconfig call or two. regards, tom lane
my version is 8.3.3: I found that it's part of the server. is it said that I should build postgresql with libxml again?? On Mon, 2008-07-28 at 23:00 -0400, Tom Lane wrote: > Yi Zhao <yi.zhao@alibaba-inc.com> writes: > > 1. ./configure --with-libxml --with-libxslt > > 2. make&&make install (successful) > > 3. test=# \i /usr/local/pgsql/share/contrib/pgxml.sql > > > error appearance: > > SET > > psql:/usr/local/pgsql/share/contrib/pgxml.sql:10: ERROR: could not load > > library "/usr/local/pgsql/lib/pgxml.so": /usr/lib/libxml2.so.2: > > undefined symbol: gzopen64 > > Well, you've still failed to mention most all of the relevant > information, like what platform this is and what PG version. > But what the above suggests is that libxml2 is linked to a > version of libz that doesn't appear anywhere in the dynamic > linker's search path. How did you obtain or build libxml2, > exactly? If this is a Linux platform, I think you might have > missed out a ldconfig call or two. > > regards, tom lane >
Yi Zhao <yi.zhao@alibaba-inc.com> writes: > my version is 8.3.3: I kinda doubt that, actually, because you should not have been getting "function not found" errors in 8.3. An 8.3 server built without XML support should react more like this: regression=# select xpath('foo','bar'); ERROR: unsupported XML feature DETAIL: This functionality requires the server to be built with libxml support. HINT: You need to rebuild PostgreSQL using --with-libxml. In any case the error you're showing us suggests that the libxml installation is broken, not PG itself. You still haven't told us the platform... regards, tom lane
Yi Zhao wrote: > my version is 8.3.3: > I found that it's part of the server. > is it said that I should build postgresql with libxml again?? > googling gzopen64 throws up a whole lot of hits - most of them were debian/ubuntu and boiled down to some problem with versions of libz.so klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: kgore4@une.edu.au