1

I'm trying to install ibm_db2 through pecl:

pecl install ibm_db2

Then when it asks for an install dir, I have tried various places only to have the same result. It goes through a bunch of checks etc., then tries to 'make' and gets an error:

/usr/bin/ld: skipping incompatible /home/db2inst1/sqllib/lib32//libdb2.so when searching for -ldb2
/usr/bin/ld: cannot find -ldb2

It always looks there for the libraries. And they exist, because when I execute:

locate libdb2.so

It displays:

/opt/ibm/db2/V10.1/lib32/libdb2.so
/opt/ibm/db2/V10.1/lib32/libdb2.so.1
/opt/ibm/db2/V10.1/lib64/libdb2.so
/opt/ibm/db2/V10.1/lib64/libdb2.so.1

But they're in /opt/ibm.

I was looking at this link: pecl instal ibm_db2 fails, it seems like it's something to do with the headers/libraries being configured incorrectly?

I am currently running RHEL 6.6.

Community
  • 1
  • 1
ALOIVIA
  • 41
  • 1
  • 9
  • Looks like you may be trying to build a 64-bit version of ibm_db2 while your DB2 instance is 32-bit. What is your OS bitness? Where does `/home/db2inst1/sqllib/lib` point? – mustaccio Apr 30 '15 at 14:12
  • Think this is resolved: I am using php, and in my php.ini file I had some (seemingly unrelated) extensions included which were causing issues. Commenting out these extensions and installing the 'devel' version of ibm_db2 seems to have fixed this problem. However, there are a few more instances where I need to install libraries that are failing, so I'll do some more digging around php.ini... – ALOIVIA Apr 30 '15 at 14:47

1 Answers1

0

So it turns out I didn't actually need to include these libraries in php.ini or through pecl (doing it that way meant it was looking on a path it couldn't find for some reason), because they were already set up from my PHP configure command. It put the headers in a certain location , and by making that location available to Apache, the app worked fine, no need to include them in php.ini.

ALOIVIA
  • 41
  • 1
  • 9