How to I do install DB2 ODBC?

Posted by Justin on Ask Ubuntu See other posts from Ask Ubuntu or by Justin
Published on 2011-05-26T18:50:59Z Indexed on 2011/11/27 2:01 UTC
Read the original article Hit count: 527

Filed under:
|

I have been trying, with no success, to install a IBM DB2 ODBC driver so that my PHP server can connect to a database. I've tried installing the db2_connect and get all sorts of problems, I tried install I Access for Linux and the RPM did not install right nor did using alien breed any useful results. I've also tried the DB2 Runtime v8.1, no success.

If I attempt to run the rpm it claims I need dependencies that I can't find in apt-get. Yum is also not very helpful as it appears I don't have any repositories installed or lists...

Running the simple RPM gives me this result in terminal:

# rpm -ivh iSeriesAccess-7.1.0-1.0.x86_64.rpm
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: Failed dependencies:
    /bin/ln is needed by iSeriesAccess-7.1.0-1.0.x86_64
    /sbin/ldconfig is needed by iSeriesAccess-7.1.0-1.0.x86_64
    /bin/rm is needed by iSeriesAccess-7.1.0-1.0.x86_64
    /bin/sh is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libc.so.6()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libc.so.6(GLIBC_2.2.5)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libc.so.6(GLIBC_2.3)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libdl.so.2()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libdl.so.2(GLIBC_2.2.5)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libgcc_s.so.1()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libm.so.6()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libm.so.6(GLIBC_2.2.5)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libodbcinst.so.1()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libodbc.so.1()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libpthread.so.0()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libpthread.so.0(GLIBC_2.2.5)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libpthread.so.0(GLIBC_2.3.2)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    librt.so.1()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    librt.so.1(GLIBC_2.2.5)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libstdc++.so.6()(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libstdc++.so.6(CXXABI_1.3)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64
    libstdc++.so.6(GLIBCXX_3.4)(64bit) is needed by iSeriesAccess-7.1.0-1.0.x86_64

Using alien and running the dkpg gives me thes headaque:

$ alien iSeriesAccess-7.1.0-1.0.x86_64.rpm --scripts
# dpkg -i iseriesaccess_7.1.0-2_amd64.deb
(Reading database ... 127664 files and directories currently installed.)
Preparing to replace iseriesaccess 7.1.0-2 (using iseriesaccess_7.1.0-2_amd64.deb) ...
Unpacking replacement iseriesaccess ...
post uninstall processing for iSeriesAccess 1.0...upgrade
/var/lib/dpkg/info/iseriesaccess.postrm: line 8: [: upgrade: integer expression expected
Setting up iseriesaccess (7.1.0-2) ...
post install processing for iSeriesAccess 1.0...configure
iSeries Access ODBC Driver has been deleted (if it existed at all) because its usage count became zero
odbcinst: Driver installed. Usage count increased to 1.
Target directory is /etc
odbcinst: Driver installed. Usage count increased to 3.
Target directory is /etc
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

So it seems the files installed right, well my odbc driver shows up but db2cli.ini is no where to be found.

So several questions. Is there a better alternative to connect php to db2, say an ubuntu package I can just install? Can someone direct me to the steps that makes my ubuntu server works well with the RPM so I can build my db2 instance?

Also remember I'm connection to an I Series remotely. I'm not using the DB2 Express C thing, even if I did try it to get the db2 php functions to work. And I don't have zend but I think I have every other package on the ubuntu repositories. Help, thank you!

© Ask Ubuntu or respective owner

Related posts about php

Related posts about database