• Home »
  • Insights »
  • IBM Java SDK Install Error: Failed dependencies: /usr/lib64/libstdc++.so.5 is needed by ibm-java-x86_64-sdk-6.0-9.1.x86_64

IBM Java SDK Install Error: Failed dependencies: /usr/lib64/libstdc++.so.5 is needed by ibm-java-x86_64-sdk-6.0-9.1.x86_64

While setting up a websphere test server I ran into a minor dependency error during the beginning of installing the necessary packages for websphere. The IBM Java SDK RPM on CentOS 6 was complaining about a failed dependency of a libstdc++ library. The RPM I was attempting to install required libstdc++.so.5 and CentOS 6 has libstdc++.so.6 installed by default. All that is required is to install the libstdc++ compat RPM. The information below describes the error in more detail, how I located the package that installed the necessary file(s), and an example of installing the needed package.

Failed Dependency Error On CentOS 6 Installing IBM Java SDK:

bash

  1. [root@dev ~]$ rpm -Uhv ibm-java-x86_64-sdk-6.0-9.1.x86_64.rpm
  2. error: Failed dependencies:
  3.     /usr/lib64/libstdc++.so.5 is needed by ibm-java-x86_64-sdk-6.0-9.1.x86_64
  4. [root@dev ~]$

As you can see above libstdc++.so.5 is needed by the ibm-java-sdk RPM. Whenever I run across a dependency error on CentOS the first thing I do is search for what package in the installed YUM repositories will provide the needed dependency, if any at all. Use the below example to see how to search through the packages for specific files that are installed.

Search YUM Repository For Package That Installs Dependency:

bash

  1. [root@dev ~]$ yum whatprovides *libstdc++.so.5*
  2. Loaded plugins: fastestmirror, refresh-packagekit
  3. base/filelists_db                                                                                                 | 5.6 MB     00:10
  4. epel/filelists_db                                                                                                 | 5.4 MB     00:05
  5. extras/filelists_db                                                                                               |  738 B     00:00
  6. updates/filelists_db                                                                                              | 2.6 MB     00:03
  7. compat-libstdc++-33-3.2.3-69.el6.i686 : Compatibility standard C++ libraries
  8. Repo        : base
  9. Matched from:
  10. Other       : libstdc++.so.5(GLIBCPP_3.2.3)
  11. Other       : libstdc++.so.5(GLIBCPP_3.2.2)
  12. Other       : libstdc++.so.5(GLIBCPP_3.2.4)
  13. Other       : libstdc++.so.5
  14. Other       : libstdc++.so.5(CXXABI_1.2.1)
  15. Other       : libstdc++.so.5(CXXABI_1.2)
  16. Filename    : /usr/lib/libstdc++.so.5.0.7
  17. Other       : libstdc++.so.5(GLIBCPP_3.2.1)
  18. Other       : libstdc++.so.5(CXXABI_1.2.2)
  19. Filename    : /usr/lib/libstdc++.so.5
  20. Other       : libstdc++.so.5(GLIBCPP_3.2)
  21.  
  22. compat-libstdc++-33-3.2.3-69.el6.x86_64 : Compatibility standard C++ libraries
  23. Repo        : base
  24. Matched from:
  25. Other       : libstdc++.so.5(GLIBCPP_3.2.4)(64bit)
  26. Other       : libstdc++.so.5(GLIBCPP_3.2.1)(64bit)
  27. Filename    : /usr/lib64/libstdc++.so.5
  28. Other       : libstdc++.so.5(GLIBCPP_3.2.3)(64bit)
  29. Other       : libstdc++.so.5()(64bit)
  30. Other       : libstdc++.so.5(GLIBCPP_3.2.2)(64bit)
  31. Filename    : /usr/lib64/libstdc++.so.5.0.7
  32. Other       : libstdc++.so.5(CXXABI_1.2.1)(64bit)
  33. Other       : libstdc++.so.5(CXXABI_1.2.2)(64bit)
  34. Other       : libstdc++.so.5(CXXABI_1.2)(64bit)
  35. Other       : libstdc++.so.5(GLIBCPP_3.2)(64bit)
  36.  
  37. [root@dev ~]$

As you can see in the above output of “yum whatprovides” it looks like there are two packages in the installed YUM repos that will install the necessary dependency of libstdc++.so.5. One of the versions is the i686 version or 32 bit version and the other is the x86_64 version or 64 bit version. In this example we are on a 64-bit server so by default the 64-bit package will be installed as shown in the below example.

Install compat-libstdc++-33 For libstdc++.so.5 Library:

bash

  1. [root@dev ~]# yum install compat-libstdc++-33
  2. Loaded plugins: fastestmirror, refresh-packagekit
  3. Loading mirror speeds from cached hostfile
  4. epel/metalink                                                                                                                 |  13 kB     00:00
  5.  * base: mirror.steadfast.net
  6.  * epel: mirror.steadfast.net
  7.  * extras: centos.mirrors.tds.net
  8.  * updates: mirror.steadfast.net
  9. base                                                                                                                          | 3.7 kB     00:00
  10. extras                                                                                                                        | 3.0 kB     00:00
  11. updates                                                                                                                       | 3.5 kB     00:00
  12. Setting up Install Process
  13. Resolving Dependencies
  14. --> Running transaction check
  15. ---> Package compat-libstdc++-33.x86_64 0:3.2.3-69.el6 set to be updated
  16. --> Finished Dependency Resolution
  17.  
  18. Dependencies Resolved
  19.  
  20. =====================================================================================================================================================
  21.  Package                                     Arch                           Version                               Repository                    Size
  22. =====================================================================================================================================================
  23. Installing:
  24.  compat-libstdc++-33                         x86_64                         3.2.3-69.el6                          base                         183 k
  25.  
  26. Transaction Summary
  27. =====================================================================================================================================================
  28. Install       1 Package(s)
  29. Upgrade       0 Package(s)
  30.  
  31. Total download size: 183 k
  32. Installed size: 806 k
  33. Is this ok [y/N]: y
  34. Downloading Packages:
  35. compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm                                                                                   | 183 kB     00:00
  36. Running rpm_check_debug
  37. Running Transaction Test
  38. Transaction Test Succeeded
  39. Running Transaction
  40.   Installing     : compat-libstdc++-33-3.2.3-69.el6.x86_64                                                                                       1/1
  41.  
  42. Installed:
  43.   compat-libstdc++-33.x86_64 0:3.2.3-69.el6
  44.  
  45. Complete!
  46. [root@dev ~]#

Now the necessary library file to move forward with the IBM Java SDK installation should be installed so we will attempt to install the RPM package downloaded from IBM as shown in the below example output.

Install IBM Java SDK On CentOS Linux 6:

bash

  1. [root@dev ~]# rpm -Uhv ibm-java-x86_64-sdk-6.0-9.1.x86_64.rpm
  2. Preparing...                ########################################### [100%]
  3.    1:ibm-java-x86_64-sdk    ########################################### [100%]
  4. [root@dev ~]#

Success!

WebSphere Application Server Administration Using Jython (Hardcover)


List Price: $54.99
New From: $85.50 USD In Stock
Used from: $85.48 USD In Stock

Application Architecture for WebSphere: A Practical Approach to Building WebSphere Applications (Paperback)


List Price: $54.99 USD
New From: $20.23 USD In Stock
Used from: $1.23 USD In Stock

Share