I install that:
sudo apt-get install unixodbc unixodbc-dev
I download mariadb-connector-odbc-3.0.2-ga-debian-x86_64.tar.gz from here https://downloads.mariadb.com/Connectors/odbc/connector-odbc-3.0.2/ and copy libmaodbc.so from archive to /usr/lib/x86_64-linux-gnu/odbc/
Next I configure odbcinst.ini:
[MariaDB]
Description=MariaDB
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
FileUsage=1
and next odbc.ini:
[ast-con]
Description = MariaDB connection to 'asterisk' database
Driver = MariaODBC
Database = AsteriskDB
Server = localhost
UserName = zk
Password = rt131cvn
Port = 3306
Socket = /var/run/mysqld/mysqld.sock
Command:
root@asterisk:/etc# odbcinst -q -d
[MariaODBC]
Next I try to check odbc with isql:
root@asterisk:/etc# isql -v ast-con
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so # latest stable from https://downloads.mariadb.org/connector-odbc/+releases/' : file not found
[ISQL]ERROR: Could not SQLConnect
I try search google, and find 1 solution, but it doesn't help:
I set LD_LIBRARY_PATH
root@asterisk:/etc# env
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/odbc
SSH_CONNECTION=xx.xxx.xxx.xxx 64759 xx.xxx.xxx.xx 22
OLDPWD=/root
XDG_SESSION_ID=26153
USER=root
PWD=/etc
HOME=/root
SSH_CLIENT=xx.xxx.xxx.xxx 64759 22
SSH_TTY=/dev/pts/0
MAIL=/var/mail/root
TERM=xterm
SHELL=/bin/bash
SHLVL=1
LOGNAME=root
XDG_RUNTIME_DIR=/run/user/0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
_=/usr/bin/env
Next command:
root@asterisk:/etc# ldd /usr/lib/x86_64-linux-gnu/odbc/libmaodbc.so
linux-vdso.so.1 (0x00007fffad26f000)
libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007f5ad171d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5ad1419000)
libssl.so.1.0.0 => not found
libcrypto.so.1.0.0 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ad107a000)
libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f5ad0e6e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5ad0c51000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5ad1be9000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5ad0a4d000)
Usually there is libodbcinst.so.1 => not found and then exec something like this: ln -s libodbcinst.so.1 libodbcinst.so.2.0.0
but my result is different, and I can not to understand what should I do ? Help please!