[egenix-users] mxODBC with unixODBC on Ubuntu

M.-A. Lemburg mal at egenix.com
Fri Dec 5 14:31:00 CET 2014


Dear Users,

we just got a support request from a user who has trouble installing
mxODBC on Ubuntu. The answer may be interesting for other users as
well, so I'm posting it here:

Recent Ubuntu versions are shipping unixODBC 2.3.1, but have not
implemented the change in the library name that was done upstream.

As a result, you get a linker error when importing mxODBC on Ubuntu
mentioning a missing libodbc.so.2 shared object file when trying
to load the mxODBC extension.

For the unixODBC change, see the 2.3.1 release notes on:

 * http://www.unixodbc.org/

 """
 Major change is to change the library version number from 1 to 2 to
 signal the SQLLEN change for 64 land. Should have been done for 2.3.0,
 but better late than never. So if after installing you have apps that
 can't find libodbc.so, its likely they are linked to libodbc.so.1,
 so just create a symlink from libodbc.so.2
 """

Note that the actual change to SQLLEN was already implemented in
version 2.2.13.

The situation for recent Ubuntu versions is as follows:

* trusty (12.04 LTS)
  - http://packages.ubuntu.com/precise/libs/unixodbc
  - http://packages.ubuntu.com/precise/libodbc1

  Ships with unixODBC 2.2.14p2, but still uses libodbc.so.1
  and does not provide the symlink for libodbc.so.2.

  Note that unixODBC 2.2.14 already has the SQLLEN 64-bit change,
  so the libodbc.so.1 shipped with 14.04 is compatible
  with libodbc.so.2.

* trusty (14.04 LTS)
  - http://packages.ubuntu.com/trusty/libs/unixodbc
  - http://packages.ubuntu.com/trusty/libodbc1

  Ships with unixODBC 2.2.14p2, but still uses libodbc.so.1
  and does not provide the symlink for libodbc.so.2.

  Same note as for 12.04 LTS.

* utopic (14.10)
  - http://packages.ubuntu.com/utopic/libs/unixodbc
  - http://packages.ubuntu.com/utopic/libodbc1

  Ships with unixODBC 2.3.1, provides both libodbc.so.1
  and libodbc.so.2.

  Should work out of the box.

* vivid
  - http://packages.ubuntu.com/vivid/libs/unixodbc
  - http://packages.ubuntu.com/vivid/libodbc1

  Ships with unixODBC 2.3.1, provides both libodbc.so.1
  and libodbc.so.2.

  Should work out of the box.

Accordingly, the workaround for Ubuntu 12.04 (precise) and
14.04 (trusty) is to apply the same symlink as in the later
releases:

sudo ln -s /usr/lib/libodbc.so.1 /usr/lib/libodbc.so.2

Hope that helps.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 05 2014)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Plone/Zope.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2014-12-02: Released mxODBC Connect 2.1.2 ...     http://egenix.com/go66

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/



More information about the egenix-users mailing list