how to make vertica client work on alpine linux
-
- Offline
- 10 months 2 weeks ago
- 2017-05-05
I have dockerized instance of alpine linux running a program trying to connect to Vertica server.
With all other configurations in place, I get following error, if I try to connect to vertica:
isql -v VERTICA
[01000][unixODBC][Driver Manager]Can't open lib '/opt/vertica/lib64/libverticaodbc.so' : file not found
[ISQL]ERROR: Could not SQLConnect
Here are some important files:
1. /etc/odbc.ini
[VERTICA]
Driver = HPVertica
Database = MYDB
ServerName = MYSVR
Port = MYPORT
UserName = USER
Password = PASS
Locale = en_US
2. /etc/odbcinst.ini
[HPVertica]
Description = HP Vertica Driver
Driver = /opt/vertica/lib64/libverticaodbc.so
3. /etc/vertica.ini
[Driver]
DriverManagerEncoding=UTF-16
ODBCInstLib =/usr/lib/libodbcinst.so.2
LogLevel=4
LogPath=/tmp
The env variable VERTICAINI is set to /etc/vertica.ini
I am using vertica-client v7 drivers for linux and made sure all the files referenced in above config files exist and point to valid files.
Using ldd on vertica client driver dynamic library file gives following output:
ldd /opt/vertica/lib64/libverticaodbc.so
ldd (0x559f71f43000)
libdl.so.2 => ldd (0x559f71f43000)
Error loading shared library libresolv.so.2: No such file or directory (needed by /opt/vertica/lib64/libverticaodbc.so)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x7f9f4e604000)
libpthread.so.0 => ldd (0x559f71f43000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f9f4e2b4000)
libm.so.6 => ldd (0x559f71f43000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f9f4e0a1000)
libc.so.6 => ldd (0x559f71f43000)
Error relocating /opt/vertica/lib64/libverticaodbc.so: __dn_skipname: symbol not found
Error relocating /opt/vertica/lib64/libverticaodbc.so: __res_init: symbol not found
Error relocating /opt/vertica/lib64/libverticaodbc.so: __strtod_internal: symbol not found
Error relocating /opt/vertica/lib64/libverticaodbc.so: __rawmemchr: symbol not found
Is the failure because of the missing link to libresolv.so.2?
I looked into the alpine package manager but did not find any package to install libresolv.
Would greatly appreciate any help get past this issue and connect to vertica.