CentOS 7 httpd-devel, gcc, gcc-c++ 설치 시 에러 문제
Linux 2024. 12. 9. 11:00CentOS 7의 공식 지원이 종료되고 라이브러리들 버전이 변경되며 구 버전과 호환되지 않는 문제가 발생했네요.
Error: Package: libdb-devel-5.3.21-24.el7.x86_64 (base)
Requires: libdb(x86-64) = 5.3.21-24.el7
Installed: libdb-5.3.21-25.el7.x86_64 (@anaconda)
libdb(x86-64) = 5.3.21-25.el7
Available: libdb-5.3.21-24.el7.x86_64 (base)
libdb(x86-64) = 5.3.21-24.el7
Error: Package: openldap-devel-2.4.44-20.el7.x86_64 (base)
Requires: openldap(x86-64) = 2.4.44-20.el7
Installed: openldap-2.4.44-22.el7.x86_64 (@anaconda)
openldap(x86-64) = 2.4.44-22.el7
Available: openldap-2.4.44-20.el7.x86_64 (base)
openldap(x86-64) = 2.4.44-20.el7
Error: Package: glibc-2.17-260.el7.i686 (base)
Requires: glibc-common = 2.17-260.el7
Installed: glibc-common-2.17-317.el7.x86_64 (@anaconda)
glibc-common = 2.17-317.el7
Available: glibc-common-2.17-260.el7.x86_64 (base)
glibc-common = 2.17-260.el7
Error: Package: libstdc++-devel-4.8.5-36.el7.x86_64 (base)
Requires: libstdc++(x86-64) = 4.8.5-36.el7
Installed: libstdc++-4.8.5-44.el7.x86_64 (@anaconda)
libstdc++(x86-64) = 4.8.5-44.el7
Available: libstdc++-4.8.5-36.el7.x86_64 (base)
libstdc++(x86-64) = 4.8.5-36.el7
yum의 downgrade 명령어를 사용해 버전을 낮춰줍니다.
yum downgrade -y glibc glibc-common
yum downgrade -y libdb libdb-utils
yum downgrade -y openldap libstdc++
이렇게 다운그레이드 하고 다시 설치하려고 하니 다른 에러가 나는군요.
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for libgomp which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of libgomp of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude libgomp.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of libgomp installed, but
yum can only see an upgrade for one of those architectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of libgomp installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: libgomp-4.8.5-36.el7.i686 != libgomp-4.8.5-44.el7.x86_64
Error: Protected multilib versions: expat-2.1.0-10.el7_3.i686 != expat-2.1.0-12.el7.x86_64
Error: Protected multilib versions: nss-softokn-freebl-3.36.0-5.el7_5.i686 != nss-softokn-freebl-3.44.0-8.el7_7.x86_64
말이 많지만 결국 버전이 안 맞다는 말입니다.
libgomp, expat, nss를 각각 다운그레이드 해줍니다.
yum downgrade -y libgomp
yum downgrade -y expat
yum downgrade -y nss nss-softokn nss-sysinit nss-tools
이후에
yum install -y httpd-devel gcc gcc-c++ 명령으로 설치해주면 성공!