When attempting to install 32-bit libraries on a 64-bit CentOS 6.4 system using yum install libgcc.i686
, you encountered the "protected multilib versions" error. This occurs when:
- Different architecture versions of the same package have version mismatches
- Dependency requirements conflict between packages
- System tries to maintain parallel installations of i686 and x86_64 packages
The error message clearly shows:
Protected multilib versions: libgcc-4.4.7-4.el6.i686 != libgcc-4.4.7-3.el6.x86_64
This indicates you have:
- libgcc-4.4.7-3.el6.x86_64 (64-bit version) installed
- Package manager trying to install libgcc-4.4.7-4.el6.i686 (newer 32-bit version)
1. First Attempt: Clean Update
Try updating all packages first:
yum update
Then retry the installation:
yum install libgcc.i686
2. Manual Version Synchronization
If the conflict persists, manually align versions:
yum downgrade libgcc.x86_64
Or alternatively:
yum update libgcc.x86_64
3. Advanced Resolution: Temporary Architecture Exclusion
When version alignment isn't possible:
yum install libgcc.i686 --exclude=libgcc.x86_64
Then verify the installation:
rpm -qa | grep libgcc
Create a temporary yum configuration:
echo "[main]" > /etc/yum.conf.tmp echo "protected_multilib=false" >> /etc/yum.conf.tmp yum -c /etc/yum.conf.tmp install libgcc.i686
Warning: This bypasses important safety checks - only use when absolutely necessary.
After successful installation, verify both architectures:
rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" libgcc
Example output should show both versions:
libgcc-4.4.7-4.el6.i686 libgcc-4.4.7-4.el6.x86_64
When working with CentOS 6.4, you might encounter multilib conflicts when trying to install 32-bit libraries alongside 64-bit versions. The specific error occurs when running:
yum install libgcc.i686
The error indicates three potential scenarios:
- Missing dependencies for a libgcc upgrade
- Multiple architectures installed with incomplete updates
- Duplicate versions of libgcc already present
Solution 1: Diagnostic Approach
yum install libgcc.i686 --exclude libgcc.x86_64
yum check
rpm -qa | grep libgcc
Solution 2: Version Synchronization
yum update libgcc.x86_64
yum install libgcc.i686
Solution 3: Clean Installation
yum remove libgcc
yum install libgcc.i686 libgcc.x86_64
For persistent issues, examine package dependencies:
repoquery --requires libgcc.i686
yum deplist libgcc.i686
Verify repository consistency:
yum clean all
yum makecache
Manual RPM installation (if absolutely necessary):
rpm -ivh --nodeps http://vault.centos.org/6.4/os/x86_64/Packages/libgcc-4.4.7-4.el6.i686.rpm
Remember that disabling multilib protection is rarely advisable:
# Not recommended unless absolutely necessary
yum --setopt=protected_multilib=false install libgcc.i686
When developing cross-platform C++ applications, you might need both architectures:
# Compile 32-bit version
g++ -m32 hello.cpp -o hello32
# Requires libgcc.i686