This happened to me. If it's happening to you, maybe this can save you a bit of time.

I was installing 64-bit DB2 10.5 server (not sure exactly what product package -- someone gave it to me) on a SoftLayer 64-bit Ubuntu 12.04 Linux system that included a LAMP stack.

Bottom line first: It turns out that I was missing 32-bit libpam and 64-bit libaio and needed to do:

   apt-get install libpam0g:i386 libaio1

Most folks' mileage will undoubtedly vary. In case only part of the experience applies to you, and would be helpful for you, here is more detail.

Before the install, db2prereqcheck complained:

   DBT3514W  The db2prereqcheck utility failed to find the following
   32-bit library file: "/lib/libpam.so*".

Sure enough, all I had was:


After looking around the web a bit, I did:

   apt-get install libpam0g:i386

after which I also had:


But db2prereqcheck still made the same complaint.

A number of places on the web recommended:

   ln -s /lib/i386-linux-gnu/libpam.so.0 /lib/libpam.so.0

but that seemed to me like a grotesque hack, that would be sure to land me in different trouble with different applications farther down the road.

I tried a number of things with environment variables, including LD_LIBRARY_PATH and LD_LIBRARY_PATH_32, but nothing helped with the db2prereqcheck.

Someone I trust said to just go ahead with the install anyway. So I did


(it was a remote headless system), and although the db2prereqcheck that runs as part of the install complained, the install did work.

Sadly, db2start complained:

   sqllib/adm/db2start: error while loading shared libraries:
   libaio.so.1: wrong ELF class: ELFCLASS32

Someone I trusted recommended:

   apt-get install libaio1

which installed 64-bit libaio (prior to that my system only included 32-bit), after which I ended up with:


After that, everything went fine.

Again, bottom line: I was missing 32-bit libpam and 64-bit libaio.

BTW, my system image already included packages libstdc++6 and lib32stdc++6 -- something which a lot of folks seem to be missing in their environments.

Hope this helps.

  • 2
    Please separate question from answer. Mar 1, 2014 at 19:53

4 Answers 4


On Ubuntu server 14.04.02 (64 bit) I had to install the following packages before installing DB2 10.5:

  • libx32stdc++6
  • libpam0g:i386
  • libaio1
  • 3
    Note: You might need to add packages for i386 architecture: sudo dpkg --add-architecture i386 then sudo apt-get update and finally sudo apt-get install libpam0g:i386. Note for beginners getting DB2 installed: You install these packages using apt-get, the Ubuntu package manager. Ex: apt-get install libx32stdc++6. Use sudo to run these commands as root. (Otherwise you may not have enough access permissions.) Jun 9, 2016 at 18:03

You may have to run ldconfig after installing the i386 version of the pam library; DB2 searches the linker cache for it's dependencies, so if it's installed and there is an entry in /etc/ld.so.cache.d/, it should find it if ldconfig has been run.

Running something like strace db2 connect to sample will give you a lot of information.

ln -s /lib/i386-linux-gnu/libpam.so.0 /lib/libpam.so.0

This did the trick for me, despite the ugly hack.

apt-get install libpam0g said everything was installed and up to date.


For the once trying to install DB2 with Ubuntu 20.04 LTS the missing package can be installed with the command:

sudo apt-get install libpam0g-dev:i386

NOTE: the libpam0g-dev package is safer to install than the libpam0g package since it can be safely used only for development compilations and setup software to be installed.

NOTE2: the amd64 is around for more than 20 years now, maybe IBM will update DB2 to amd64 one of these days.

NOTE3: Thank you for this question, it save me hours of try and error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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