Related pages:

The Apache Agent depends on libstdc++6. Some servers, primarily IHS and OHS, have modules built with libstdc++.so.5. This conflict can prevent Apache from starting successfully.

Check for libstdc++5 Dependencies

To determine if your web server has libstdc++.so.5 dependencies:

  1. Change directory to your web server’s modules directory.
  2. Run this command:

    ldd *.so 2>&1 | grep -v 'execution permission' | grep 'libstdc++.so.5'
  3. If this command returns any results—for example, libstdc++.so.5 => /lib64/libstdc++.so.5—your server has a dependency on libstdc++.so.5.

Resolution Overview

To avoid libstdc++5 conflicts, force libstdc++6 to load before libstdc++5 when Apache is started. The general steps for performing this configuration are: 

  1. Identify the paths to libstdc++.so.6.
  2. Determine the correct libstdc++.so.6 path for your installation. 
  3. Use the LD_PRELOAD environment variable to have libstdc++6 preloaded.

These steps are detailed in the following sections.

Identify the Paths to libstdc++.so.6

From a command prompt, run:

ldconfig -p | grep libstdc++.so.6

This will return one or more paths. For example:

/lib64/libstdc++.so.6
/lib/libstdc++.so.6

Determine the Correct libstdc++.so.6 Path for the Installation

If more than one path is returned, determine which is the correct path for your Apache Server installation.

If you are running a 64-bit operating system, but a 32-bit version of IHS or OHS, choose the 32-bit version, which in our example would be:

/lib/libstdc++.so.6

Add the Export LD_PRELOAD Command

Open the envvars** file, which is located in the /bin directory of your IHS or OHS installation. Add the following line, using the path to the libstdc++.so.6 path that you determined in the previous step.

export LD_PRELOAD=<path-to-libstdc++.so.6>

This will cause libstdc++.so.6 to be loaded before libstdc++.so.5, and the conflict will be averted.