Originally posted by: mmetts
I am runing the Postgres client tools on AIX 7.1. When I try to run psql, I get this error:
[mmetts@crcoacs1 ~]$ psql -h crcopwr2 -d bank
Could not load program psql_64:
Symbol resolution failed for psql_64 because:
Symbol _GLOBAL__AIXI_libxml2_so (number 210) is not exported from dependent
module /usr/lib/libxml2.a[libxml2.so.2].
Symbol _GLOBAL__AIXD_libxml2_so (number 211) is not exported from dependent
module /usr/lib/libxml2.a[libxml2.so.2].
Examine .loader section symbols with the 'dump -Tv' command.
It looks as though psql is finding this lib rather than the one in /opt/freeware/lib
[mmetts@crcoacs1 20181217_fcc_nmp]$ ll /usr/lib/libxml2.a
lrwxrwxrwx 1 root system 22 May 14 2017 /usr/lib/libxml2.a -> /usr/ccs/lib/libxml2.a*
So this strikes me as kind of an odd problem since I thought that the open source software was supposed to "play nice" with the rest of AIX. BTW, here's where the native libxml2.a is coming from:
[mmetts@crcoacs1 20181217_fcc_nmp]$ lslpp -w /usr/ccs/lib/libxml2.a
File Fileset Type
----------------------------------------------------------------------------
/usr/ccs/lib/libxml2.a bos.rte.control File
[mmetts@crcoacs1 20181217_fcc_nmp]$ lslpp -l bos.rte.control
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
bos.rte.control 7.1.4.30 COMMITTED System Control Commands
Path: /etc/objrepos
bos.rte.control 7.1.4.30 COMMITTED System Control Commands
To fix this, I can prefix the command like so:
[mmetts@crcoacs1 ~]$ LIBPATH= psql -h crcopwr2 -d bank
Password:
psql (10.4)
Type "help" for help.
bank=> select * from class;
name | sex | age | height | weight
---------+-----+-----+--------+--------
Alfred | M | 14 | 69 | 112.5
Alice | F | 13 | 56.5 | 84
Barbara | F | 13 | 65.3 | 98
Carol | F | 14 | 62.8 | 102.5
Henry | M | 14 | 63.5 | 102.5
James | M | 12 | 57.3 | 83
Jane | F | 12 | 59.8 | 84.5
Janet | F | 15 | 62.5 | 112.5
Jeffrey | M | 13 | 62.5 | 84
John | M | 12 | 59 | 99.5
Joyce | F | 11 | 51.3 | 50.5
Judy | F | 14 | 64.3 | 90
Louise | F | 12 | 56.3 | 77
Mary | F | 15 | 66.5 | 112
Philip | M | 16 | 72 | 150
Robert | M | 12 | 64.8 | 128
Ronald | M | 15 | 67 | 133
Thomas | M | 11 | 57.5 | 85
William | M | 15 | 66.5 | 112
(19 rows)
bank=> \q
But, I'm wondering if there's a better way to handle this and still keep my LIBPATH intact as I need it for other things. Please advise.
Thanks,
Mike