In /etc/odbcinst.ini, I have: [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc.so FileUsage = 1 [PostgreSQL] Description = ODBC for PostgreSQL Driver = /usr/lib/libodbcpsql.so.2 Setup = /usr/lib/libodbcpsqlS.so.2 FileUsage = 1 CPTimeout = CPReuse = In ODBCConfig, when I try to use either PostgreSQL or MySQL, I go to User DSN and click Add. It gives my a choice of PostgreSQL or MySQL. For either one, when I try to use it, it says Could not construct a property list for (PostgreSQL) || (MySQL) General Installer Error General Installer Error
This is a known problem in the MyODBC package. Please add the line: Setup = /usr/lib/libodbcmyS.so.1 to your /etc/odbcinst.ini file. It should now look like: # From the MyODBC package [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc.so Setup = /usr/lib/libodbcmyS.so.1 FileUsage = 1 It should have worked for PostgreSQL though. Have you checked if the file /usr/lib/libodbcpsqlS.so.2 is installed on your system? Regards, Fernando
I've done that in the past to work around this bug in MyODBC, but I can't do it here. I'm using MyODBC-2.50.39-15.i386.rpm, and it doesn't include the libodbcmyS.so library file at all.
What does: rpm -q -i unixODBC and rpm -q -l unixODBC say? Can you also do a: rpm -V unixODBC please? Thanks.
> I'm using MyODBC-2.50.39-15.i386.rpm, and it doesn't include the libodbcmyS.so library file at all. Please note that this file comes in the unixODBC package, _not_ in the MySQL package or even in the MyODBC package. This is a shared library that contains default values for the unixODBC tools.
Well, wherever it comes from, it's not in rawhide unixODBC either, and neither is /usr/lib/libodbcpsqlS.so.2, which is probably why neither works [kaboom@skuld kaboom]$ rpm -qi unixODBC MyODBC Name : unixODBC Relocations: (not relocateable) Version : 2.2.5 Vendor: Red Hat, Inc. Release : 1 Build Date: Mon 07 Jul 2003 03:26:08 PM MDT Install Date: Sun 17 Aug 2003 08:43:47 AM MDT Build Host: porky.devel.redhat.com Group : System Environment/Libraries Source RPM: unixODBC-2.2.5-1.src.rpm Size : 1994825 License: LGPL Signature : DSA/SHA1, Wed 16 Jul 2003 02:33:54 PM MDT, Key ID fd372689897da07a Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> URL : http://www.unixODBC.org/ Summary : A complete ODBC driver manager for Linux. Description : Install unixODBC if you want to access databases through ODBC. This package includes drivers for PostgreSQL and local files. If you want to develop programs that will access data through ODBC, you need to install the unixODBC package. Name : MyODBC Relocations: (not relocateable) Version : 2.50.39 Vendor: Red Hat, Inc. Release : 15 Build Date: Thu 03 Jul 2003 07:31:26 AM MDT Install Date: Sat 23 Aug 2003 04:33:55 PM MDT Build Host: bugs.devel.redhat.com Group : System Environment/Libraries Source RPM: MyODBC-2.50.39-15.src.rpm Size : 122007 License: Public Domain Signature : DSA/SHA1, Wed 16 Jul 2003 02:21:47 PM MDT, Key ID fd372689897da07a Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> URL : http://www.mysql.com/downloads/api-myodbc.html Summary : ODBC driver for MySQL. Description : An ODBC driver for MySQL, for use with unixODBC [kaboom@skuld kaboom]$ rpm -V MyODBC unixODBC S.5....T c /etc/odbc.ini S.5....T c /etc/odbcinst.ini [kaboom@skuld kaboom]$
Scratch that -- was looking on the wrong system
On the rawhide box, I have [kaboom@skuld kaboom]$ ls /usr/lib/libodbc*S.so.* /usr/lib/libodbcdrvcfg1S.so.1 /usr/lib/libodbcmyS.so.1.0.0 /usr/lib/libodbcdrvcfg1S.so.1.0.0 /usr/lib/libodbcnnS.so.1 /usr/lib/libodbcdrvcfg2S.so.1 /usr/lib/libodbcnnS.so.1.0.0 /usr/lib/libodbcdrvcfg2S.so.1.0.0 /usr/lib/libodbcpsqlS.so.1 /usr/lib/libodbcminiS.so.1 /usr/lib/libodbcpsqlS.so.1.0.0 /usr/lib/libodbcminiS.so.1.0.0 /usr/lib/libodbctxtS.so.1 /usr/lib/libodbcmyS.so.1 /usr/lib/libodbctxtS.so.1.0.0 [kaboom@skuld kaboom]$ with unixODBC-2.2.5-1 installed With those, if I put [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc.so Setup = /usr/lib/libmyodbcS.so.1 FileUsage = 1 [PostgreSQL] Description = ODBC for PostgreSQL Driver = /usr/lib/libodbcpsql.so.2 Setup = /usr/lib/libodbcpsqlS.so.1 FileUsage = 1 CPTimeout = CPReuse = in /etc/odbcinst.ini, all is well.... Closing NOTABUG, thanks, though it does seem to me that this should be more set up out-of-the-box....
Sorry for getting back to this. I want to follow up on your suggestion and try to make it more "out-of-the-box". In the MySQL entry did you mean /usr/lib/libodbcmyS.so or was it indeed /usr/lib/libmyodbcS.so? (please note the position of the "my" in thiose names. [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc.so Setup = /usr/lib/libmyodbcS.so.1 FileUsage = 1 Thanks.
/usr/lib/libodbcmyS.so Here's the actual (cut-and-paste) of my file, and it's working for me: [kaboom@skuld kaboom]$ more /etc/odbcinst.ini [MySQL] Description = ODBC for MySQL Driver = /usr/lib/libmyodbc.so Setup = /usr/lib/libodbcmyS.so.1 FileUsage = 1 [PostgreSQL] Description = ODBC for PostgreSQL Driver = /usr/lib/libodbcpsql.so.2 Setup = /usr/lib/libodbcpsqlS.so.1 FileUsage = 1 CPTimeout = CPReuse = [kaboom@skuld kaboom]$ Thanks for changing this, BTW
That is what I thought. Thank you very much for the clarification. Regards, Fernando
We can't create the MySQL section in this package because the driver comes from the MySQL distribution. So what we have is just a commented suggestion for a MySQL entry. I've added a couple of comment lines that, based on your experience, will allow people to get it to work more easily. I will tell the MySQL guys about this as well in case they add an entry to the file in their RPM. Here is the new odbcinst.ini: # Example driver definitinions # # # Included in the unixODBC package [PostgreSQL] Description = ODBC for PostgreSQL Driver = /usr/lib/libodbcpsql.so Setup = /usr/lib/libodbcpsqlS.so FileUsage = 1 # Driver from the MyODBC package # Setup from the unixODBC package #[MySQL] #Description = ODBC for MySQL #Driver = /usr/lib/libmyodbc.so #Setup = /usr/lib/libodbcmyS.so #FileUsage = 1
Thanks, that looks good!