[unixODBC-support] Can't open lib error

Nick Gorham nick at lurcher.org
Thu Feb 23 14:26:28 GMT 2012


On 23/02/12 13:51, Franck Lebastard wrote:
> Hi all,
>
>
>
> I am using unixODBC 2.3.1 on Debian lenny (uname –a: Linux voyager
> 2.6.26-2-686 #1 SMP Wed Sep 21 04:35:47 UTC 2011 i686 GNU/Linux) with MySQL
> (server: 5.0.51a-24+lenny5) and it works great (thanks all!).
>
>
>
> Recently, I decided to update MySQL driver and I downloaded the last release
> (mysql-connector-odbc-5.1.10-linux-glibc2.3-x86-32bit.tar.gz). I installed
> it correctly using odbcinst but I was not able to use it.
>
>
>
> SQLConnect definitively generates the following error:
>
>
>
> ODBC SQLConnect error code= -1 [SQLState='01000' SQLMsg='[unixODBC][Driver
> Manager]Can't open lib '/usr/lib/odbc/libmyodbc5.1.10.so' : file not found'
> ]
>
>
>
> In the past, with the current driver, I also (rarely) got the same ‘file not
> found’ error for an SQLConnect call among others.
>
>
>
> Once, the same error happened and then definitely occurred for all next
> calls to SQLConnect. I had to kill the application and re-run it to get
> SQLConnect working again.
>
Try a ldd on the lib. It may be that the driver is linked against 
libodbcinst.so.1 and 2.3.1 provides libodbcinst.so.2

The version change was because of the API change that 64 bit SQLLEN 
involved. But in most cases, linking the so.2 and so.1 libs so both 
names are pointing to the same file will sort the problem out.

-- 
NIck


More information about the unixODBC-support mailing list