0
votes

I am having issues with opening an odbc connection with Vertica from my machine (running centOS)

as far as i understand i have all possible packages installed for this to work but i am still missing some driver file.

here is the error i am getting:

PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Can't open lib '/opt/vertica/lib64/libverticaodbc_unixodbc.so' : /opt/vertica/lib64/libverticaodbc_unixodbc.so: cannot open shared object file: No such file or directory, SQL state 01000 in SQLConnect in /var/www/html/* * * *.php on line 149

here are my installed packages:

php53-odbc.x86_64 
vertica-odbc.x86_64 
php-odbc.x86_64
unixODBC-libs.i386 
unixODBC-libs.x86_64
vertica-client.x86_64
vertica-odbc.x86_64

none of these produced that driver file -> libverticaodbc_unixodbc.so

Thanks.

2

2 Answers

0
votes

I have a solution for this. It isn't the best there is but it made this work, and its better then no solution at all.

I copied the file:

vertica_4.1.9_odbc_3.5_unixodbc_x86_64_linux.so

To /opt/vertica/lib64/

After that i created a link to that file with the exact name that he was looking for

 ln vertica_4.1.9_odbc_3.5_unixodbc_x86_64_linux.so libverticaodbc_unixodbc.so

And this solved it.

Hope someone will find a better solution to this and let us know too.

0
votes

This is probably something to change in your odbc.ini.

That said, which version of vertica are you using? Since 6.0 at least (and maybe before) there is no libverticaodbc_unixodbc.so or libverticaodbc_iodbc.so any more, but only one libverticaodbc.so.

So you should have in your odbc.ini:

# maybe indeed libverticaodbc_unixodbc.so instead if you have an old version
Driver64     = /opt/vertica/lib64/libverticaodbc.so
Driver       = /opt/vertica/lib64/libverticaodbc.so