Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

i do it this way:

1. sudo apt-get install php5-odbc alien

2. alien –i –c iSeriesAccess-6.1.0-1.2.x86_64.rpm

3. nano /etc/odbc.ini

[DATASOURCE NAME] 
Description = iSeries Access ODBC Driver DSN for iSeries 
Driver = iSeries Access ODBC Driver 
System = IP ADDRESS OF YOUR iSERIES 
UserID = 
Password = 
Naming = 0 
DefaultLibraries = QGPL 
Database = YOUR DATABASE
ConnectionType = 0 
CommitMode = 2 
ExtendedDynamic = 0 
DefaultPkgLibrary = QGPL 
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512 
AllowDataCompression = 1 
LibraryView = 0 
AllowUnsupportedChar = 0 
ForceTranslation = 0 
Trace = 0 
CCSID = 1208 
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.