My Oracle Support Banner

Multiple gcc / g++ Versions in Linux (Doc ID 444084.1)

Last updated on JANUARY 30, 2022

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Linux x86-64
Linux x86
IBM: Linux on System z
Linux Itanium


This NOTE is designed to help you to understand the (often unnecessary) compilations and even re-linking errors that can occur when multiple versions of gcc are present (installed) on your Linux system. This NOTE will only discuss gcc, even though gcc and g++ are a matched pair that always go together. The files, copies, links and RPMs involved for g++ are exact parallels.


This NOTE will be useful to DBA's who are having Oracle RDBMS re-linking problems, or who already know that they must manage multiple RDBMS versions on the same Linux System.

An alternative strategy to handle multiple gcc / g++ versions is presented in Metalink <NOTE 389811.1>, "GCC/G++ version incompatibility with compat-oracle-rhel4-1.0-5 rpm package installed".  This NOTE recommends the older Oracle-required gcc/g++ versioned utilities be moved to an alternate (Oracle dedicated) location. Then the oracle user PATH environment should be modified to resolve the alternate directory before resolving /usr/bin directory.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.