Skip to content

Instantly share code, notes, and snippets.

@harv
Last active March 1, 2024 08:42
Show Gist options
  • Save harv/f86690fcad94f655906ee9e37c85b174 to your computer and use it in GitHub Desktop.
Save harv/f86690fcad94f655906ee9e37c85b174 to your computer and use it in GitHub Desktop.
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
glibc-common-2.17-55.el6.x86_64.rpm \
glibc-devel-2.17-55.el6.x86_64.rpm \
glibc-headers-2.17-55.el6.x86_64.rpm
@RyanEwen
Copy link

How can I downgrade back to the regular versions?

[root@iworx ~]# yum downgrade glibc glibc-common glibc-devel glibc-headers glibc-utils glibc-static libstdc++ libstdc++-static libstdc++-devel
Loaded plugins: fastestmirror, replace, security
Setting up Downgrade Process
Loading mirror speeds from cached hostfile
 * base: mirror.dst.ca
 * epel: mirror.dst.ca
 * extras: mirror.dst.ca
 * remi-safe: repo1.ash.innoscale.net
 * updates: mirror.dst.ca
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package glibc.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade
---> Package glibc.x86_64 0:2.17-55.el6 will be erased
---> Package glibc-common.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade
---> Package glibc-common.x86_64 0:2.17-55.el6 will be erased
---> Package glibc-devel.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade
---> Package glibc-devel.x86_64 0:2.17-55.el6 will be erased
---> Package glibc-headers.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade
---> Package glibc-headers.x86_64 0:2.17-55.el6 will be erased
---> Package glibc-static.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade
---> Package glibc-static.x86_64 0:2.17-55.el6 will be erased
---> Package glibc-utils.x86_64 0:2.12-1.212.el6_10.3 will be a downgrade
---> Package glibc-utils.x86_64 0:2.17-55.el6 will be erased
---> Package libstdc++.x86_64 0:4.4.7-23.el6 will be a downgrade
---> Package libstdc++.x86_64 0:4.8.2-16.3.el6 will be erased
---> Package libstdc++-devel.x86_64 0:4.4.7-23.el6 will be a downgrade
---> Package libstdc++-devel.x86_64 0:4.8.2-16.3.el6 will be erased
--> Finished Dependency Resolution
Error: Package: libstdc++-static-4.8.2-16.3.el6.x86_64 (installed)
           Requires: libstdc++-devel = 4.8.2-16.3.el6
           Removing: libstdc++-devel-4.8.2-16.3.el6.x86_64 (installed)
               libstdc++-devel = 4.8.2-16.3.el6
           Downgraded By: libstdc++-devel-4.4.7-23.el6.x86_64 (base)
               libstdc++-devel = 4.4.7-23.el6
               libstdc++-devel = 4.4.4-15.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

@Sajjadmanal
Copy link

I am getting this issue:

2019-10-15 23:13:19 (188 KB/s) - âglibc-headers-2.17-55.el6.x86_64.rpm.2â

warning: glibc-2.17-55.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 73ec361c: NOKEY
error: Failed dependencies:
       glibc-common = 2.12-1.212.el6_10.3 is needed by (installed) glibc-2.12-1.212.el6_10.3.i686
       glibc-headers = 2.12-1.212.el6_10.3 is needed by (installed) glibc-devel-2.12-1.212.el6_10.3.i686

@xhsux
Copy link

xhsux commented Oct 25, 2019

I spent 2 whole days making 2.17 libc and linking it to my executable but failed.
Thank god I finally found this.
Thanks so much ~~~

@ostasevych
Copy link

Hey, I did that. Now when I try to install something, eg npm I am getting the following notices:
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
glibc-2.12-1.212.el6_10.3.i686 has missing requires of glibc-common = ('0', '2.12', '1.212.el6_10.3')
glibc-2.17-55.el6.x86_64 is a duplicate with glibc-2.12-1.212.el6_10.3.i686

What to do?

@Vitsen15
Copy link

Have the same problem as here:


warning: glibc-2.17-55.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID 73ec361c: NOKEY
error: Failed dependencies:
        glibc = 2.12-1.212.el6_10.3 is needed by (installed) nscd-2.12-1.212.el6_10.3.x86_64
        glibc = 2.12-1.209.el6_9.2 is needed by (installed) nscd-2.12-1.209.el6_9.2.x86_64

@daixianceng
Copy link

You might ecounter some errors: “error: Failed dependencies:“

To fix it just add this parameter --force --nodeps at the end of the all command.

@stunney
Copy link

stunney commented Apr 1, 2020

Amazing! Thank you.

@carrascodc
Copy link

Thank you so much for this. Spent so many hours troubleshooting a Python Module (Genie) on Centos6, which has a YUM Package limit of glibc-2.12. And now it works.

Much appreciated.

@burakoznur
Copy link

This works. Thanks a lot.

@irf1404
Copy link

irf1404 commented Sep 19, 2020

Work Perfect!

@chuquanghopbk
Copy link

thanks alot, it works

@tk42
Copy link

tk42 commented Sep 29, 2020

you save my day

@SalimF
Copy link

SalimF commented Nov 3, 2020

Works great on CentOS release 6.10 (Final) .

@vishalbasra
Copy link

I also needed to put kernel-headers in on CentOS release 6.6

@gomo
Copy link

gomo commented Feb 15, 2021

It works, thanks !

@chosyang
Copy link

How to update GLIBC version 2.14 on Centos6.10 ?

@JEGANMANIC
Copy link

Hello, From the current version, 3.4.13 - I need to install 3.4.14 & 3.4.15 versions. but am getting below error when I update the package - libstdc++-4.8.5-44.el7.x86_64.rpm. could you help me find out what I'm missing here?

Error: Package: libstdc++-devel-4.4.7-23.el6.x86_64 (@base)
Requires: libstdc++(x86-64) = 4.4.7-23.el6
Removing: libstdc++-4.4.7-23.el6.x86_64 (@base)
libstdc++(x86-64) = 4.4.7-23.el6
Updated By: libstdc++-4.8.5-44.el7.x86_64 (/libstdc++-4.8.5-44.el7.x86_64)
libstdc++(x86-64) = 4.8.5-44.el7
You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
glibc-2.12-1.212.el6_10.3.i686 has missing requires of glibc-common = ('0', '2.12', '1.212.el6_10.3')
glibc-2.17-55.el6.x86_64 is a duplicate with glibc-2.12-1.212.el6_10.3.i686

@JEGANMANIC
Copy link

Hey, I did that. Now when I try to install something, eg npm I am getting the following notices: ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows: glibc-2.12-1.212.el6_10.3.i686 has missing requires of glibc-common = ('0', '2.12', '1.212.el6_10.3') glibc-2.17-55.el6.x86_64 is a duplicate with glibc-2.12-1.212.el6_10.3.i686

What to do?

did you fix that issue? I'm also having the same two errors after installing the fix :)

@burakoznur
Copy link

burakoznur commented Nov 17, 2021 via email

@JEGANMANIC
Copy link

Figured it out!!
I'm new to rpm package commands and just need to pass "--force --nodeps" options to rpm command, update was successful.

root@bse [/usr/local/lib]# rpm -Uvh --force --nodeps libstdc++-4.8.5-44.el7.x86_64.rpm
warning: libstdc++-4.8.5-44.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing... ########################################### [100%]
1:libstdc++ ########################################### [100%]
root@bse [/usr/local/lib]# strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH

@JEGANMANIC
Copy link

@hao - Thank you for posting this solution!! You saved lot of time!!

@axlroden
Copy link

axlroden commented Jan 10, 2022

WARNING

This will brick many things in your Centos 6 distro, and there is no clean way to go back without knowing all symlinks before you install these.
If you are trying to do something with python that complains about requiring glibc over 2.12, consider using pip version 19 (pip install pip==19), it will use the manylinux2010 (based on Centos 6) wheels and may have c binaries for your system.

If you are compiling c binaries that need glibc > 2.12 its better to install glibc in a seperate folder and use PATH (LD_LIBRARY_PATH=/opt/glibc-2.17/lib)to link to it instead

@JEGANMANIC
Copy link

Thanks for the suggestion! We built latest python 3.9 on CentOS 6 but it was giving error that unable to load libc.so.6, so had to configure LD_LIBRARY_PATH and works

@jhult
Copy link

jhult commented Jan 11, 2022

@Sahil148024
Copy link

Hello team,

kindly help me in getting EoS/EoL date for FOSS Glibc 2.17.0.

Regards,
Sahil

@nainajais777
Copy link

Screenshot-1

kindly help ..i am trying to install visual studio code in CentOS6

@axlroden
Copy link

axlroden commented Oct 13, 2022

kindly help ..i am trying to install visual studio code in CentOS6

You can't.

@nainajais777
Copy link

kindly help ..i am trying to install visual studio code in CentOS6

You can't.

But why...i am using CentOS [10].What is the solution?

@axlroden
Copy link

Upgrade OS.

@Zhang21
Copy link

Zhang21 commented Apr 23, 2023

rpm -Uvh --nodeps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment