astfan
November 4, 2023, 2:13pm
1
Hello,
Persistently facing the error: WARNING[51358] res_odbc.c: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can’t open lib ‘/usr/local/lib/libmyodbc8a.so’ : file not found
Other tests return a success as attached. This is Asterisk 20.4.0 on Ubuntu 22.04.
What would be the misconfig?
Pooh
November 4, 2023, 2:32pm
2
“Can’t open lib ‘/usr/local/lib/libmyodbc8a.so’ : file not found”
“What would be the misconfig?”
Well, either you have not installed the MySQL ODBC driver, or you’ve installed
it elsewhere and need to put the correct path to it into odbcinst.ini
For info, on my Debian system the MariaDB equivalent driver is in
/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
Antony.
astfan
November 4, 2023, 3:00pm
4
Maybe the paths issue: Definitely not here: /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so I checked. How would I confirm the paths are ok?
astfan
November 4, 2023, 3:12pm
5
@jcolp Oops, I notice that should have asked in Asterisk Support forum. Your input?
Pooh
November 4, 2023, 3:18pm
6
“Definitely not here:
/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so”
Well, you certainly would not have that one, because I’m using MariaDB and
you’re using MySQL.
I suggest you try:
a) find / -name libmyodbc8a.so
that will tell you where it is, if it is installed
b) https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation-
binary-deb.html
that will tell you how to install it if you haven’t already
Antony
astfan
November 4, 2023, 3:33pm
7
root@databranch:~# find / -name libmyodbc8a.so
/usr/local/lib/libmyodbc8a.so
There it is…I have installed this package severally.
astfan
November 5, 2023, 11:32am
8
@penguinpbx Any word? Am stuck here for long.
Never used database features, and the general rule is that you don’t tag to request replies, as people will provide anything they can and want to provide without being prompted.
1 Like
astfan
November 6, 2023, 1:03pm
10
You have another suggestion this thing is really holding my progress back…
Pooh
November 6, 2023, 1:18pm
11
I am unable to reconcile your error message:
“Can’t open lib ‘/usr/local/lib/libmyodbc8a.so’ : file not found”
with your output from the find command:
root@databranch:~# find / -name libmyodbc8a.so
/usr/local/lib/libmyodbc8a.so
Unless there is some bizarre permissons problem in the directories leading
down to where that file is, I can’t see why ODBC is unable to open it.
Have you reviewed https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-
installation-binary-deb.html to make sure you installed the driver correctly?
Antony.
Debian 12 driver for MARIA should work out-of-the-box. Please see this relevant part of a related Ansible role (installs the off-topic FreePBX GUI with MARIA/MYSQL on Asterisk 20 on Debian 12):