Installing MYSQL ODBC Driver on RedHAt
...we have not had any luck with installing MySQL ODBC driver. Any help will be greatly appreciated.
Any ideas? we have tried soft linking to libodbc.so.2, still no luck.
yum list mysql-connector-odbc
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
Available Packages
mysql-connector-odbc.x86_64 5.1.5r1144-7.el6 rhel-x86_64-server-6
[root@st-microstrat ~]# ls
anaconda-ks.cfg install.log install.log.syslog mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm
[root@st-microstrat ~]# yum install mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Examining mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm: mysql-connector-odbc-5.1.8-1.rhel5.i386
Marking mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql-connector-odbc.i386 0:5.1.8-1.rhel5 will be installed
--> Processing Dependency: libodbc.so.1 for package: mysql-connector-odbc-5.1.8-1.rhel5.i386
--> Processing Dependency: libodbcinst.so.1 for package: mysql-connector-odbc-5.1.8-1.rhel5.i386
--> Finished Dependency Resolution
Error: Package: mysql-connector-odbc-5.1.8-1.rhel5.i386 (/mysql-connector-odbc-5.1.8-1.rhel5.i386)
Requires: libodbcinst.so.1
Error: Package: mysql-connector-odbc-5.1.8-1.rhel5.i386 (/mysql-connector-odbc-5.1.8-1.rhel5.i386)
Requires: libodbc.so.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
• • •
yum list mysql-connector-odbc
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
Available Packages
mysql-connector-odbc.x86_64 5.1.5r1144-7.el6 rhel-x86_64-server-6
[root@st-microstrat ~]# ls
anaconda-ks.cfg install.log install.log.syslog mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm
[root@st-microstrat ~]# yum install mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm
Loaded plugins: product-id, refresh-packagekit, rhnplugin, subscription-manager
Updating Red Hat repositories.
Setting up Install Process
Examining mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm: mysql-connector-odbc-5.1.8-1.rhel5.i386
Marking mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql-connector-odbc.i386 0:5.1.8-1.rhel5 will be installed
--> Processing Dependency: libodbc.so.1 for package: mysql-connector-odbc-5.1.8-1.rhel5.i386
--> Processing Dependency: libodbcinst.so.1 for package: mysql-connector-odbc-5.1.8-1.rhel5.i386
--> Finished Dependency Resolution
Error: Package: mysql-connector-odbc-5.1.8-1.rhel5.i386 (/mysql-connector-odbc-5.1.8-1.rhel5.i386)
Requires: libodbcinst.so.1
Error: Package: mysql-connector-odbc-5.1.8-1.rhel5.i386 (/mysql-connector-odbc-5.1.8-1.rhel5.i386)
Requires: libodbc.so.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
• • •
Responses
Hi,
It looks like you are trying to install a local copy of mysql-connector-odbc that you downloaded, and it doesn't appear to match the one in our RHEL repositories. Is there a reason you need that one instead of ours?
If you are fine using the supported Red Hat version, you can just do:
# yum install mysql-connector-odbc
This should pull in the necessary dependencies. The dependency that the version you specified is missing is unixODBC.
If you must use your downloaded copy, then you can try:
# yum localinstall mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm
and that should pull in the depedencies. If it doesn't, then try this first:
# yum install unixODBC
# yum localinstall mysql-connector-odbc-5.1.8-1.rhel5.i386.rpm
Let us know if that doesn't work.
Regards,
John Ruemker, RHCA
Red Hat Technical Account Manager
Online User Groups Moderator
After re-reading your post, it occurred to me that you're trying to install the 32-bit version on an x86_64 system. Is that intentional?
If so, thats the reason its not finding the dependencies. You've downloaded the 32-bit copy of the package you need (again, that doesn't seem to be from Red Hat however; see below for more details) however you don't have the 32-bit versions of the dependencies. So when you attempt to install the local package using yum, its then checking your repositories (in this case, Red Hat Network) for what it needs, and not finding them because you are registered to an x86_64-based channel.
If you must use the 32-bit version, then you'll need to download the dependencies as well. You'll probably want to get all of the following:
- libtool-ltdl.i386
- mysql.i386
- perl-DBI.i386
- unixODBC.i386
(You may need other dependencies. These are just the ones that were not already installed on my test system when I tried it).
You can access the 32-bit versions of these packages by doing the following:
1) In the Red Hat Customer Portal (access.redhat.com, where you are now) hover over the Download tab in the black bar at the top. Click Channels
2) In the dropdown boxes, choose Red Hat Enterprise Linux, 5, IA-32, and hit filter. Click the "IA-32" link next to Red Hat Enterprise Linux Server 5
3) Click the blue Packages tab
4) In the Filter by Package box, enter the package name (you'll need to do this for each of those listed above).
5) On the results page, click the link to the version of the package you want (the latest is recommended).
6) At the bottom of the page, there is a "Download Package" link. Click it and save the file.
Once you've downloaded all the packages, you can do:
# cd /path/to/downloads/
# yum localinstall <package1>.i386.rpm <package2>.i386.rpm <package3>.i386.rpm ....
Let us know if you have any questions.
Regards,
John Ruemker, RHCA
Red Hat Technical Account Manager
Online User Groups Moderator
It looks like unixODBC is already installed. Try the following to see if it is, and what arch:
# yum info installed unixODBC
Or alternatively:
# rpm -q --queryformat="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" unixODBC
If the installed version is x86_64, go ahead and remove it:
# yum remove unixODBC.x86_64
Now try installing the i386 one you downloaded.
If the one you have is .i386, then don't bother installing the downloaded one. You already have it.
Regards,
John Ruemker, RHCA
Red Hat Techincal Account Manager
Online User Groups Moderator
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
