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:
- Change directory to your web server’s modules directory.
Run this command:
- 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:
- Identify the paths to libstdc++.so.6.
- Determine the correct libstdc++.so.6 path for your installation.
- 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:
This will return one or more paths. For example:
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:
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.
This will cause libstdc++.so.6
to be loaded before l
ibstdc++.so.5
, and the conflict will be averted.