24

I need these 2 packages installed on RHEL 6 linux system. They are required by several other programs.

When I do:

sudo yum install glibc-devel

this is output:

Loaded plugins: product-id, security
Setting up Install Process
Package glibc-devel-2.12-1.166.el6_7.1.x86_64 already installed and latest version
Nothing to do

Is there some EPEL with GLIBC_2.15 for RHEL? If not - what is a workaround here?

jpyams
  • 4,030
  • 9
  • 41
  • 66
Joe
  • 11,983
  • 31
  • 109
  • 183
  • What needs those? What error are you seeing? What are you doing when you get that error? – Etan Reisner Aug 31 '15 at 18:08
  • Any program that needs these library show error. Here is one example: $ lzturbo lzturbo: /lib64/libm.so.6: version `GLIBC_2.15' not found (required by lzturbo) lzturbo: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by lzturbo) – Joe Aug 31 '15 at 18:31
  • Where did you get `lzturbo` from? No official RHEL 6 software should have this problem. Neither should anything you built on RHEL 6 from source. So where did this "random" binary come from? And why did you install it? – Etan Reisner Aug 31 '15 at 18:34
  • It came as a download binary. It came from company download site. Does this mean that no experimental software can run on RHEL without having a 'official bless' from RHEL? That is insane.. What if you want to make new discoveries with different software? Do you need to wait for RHEL? Anyway let's focus on a main question: How do you install / point GLIBC_2.15 on RHEL? If you think this discussion about official/non-official RHEL software will help me somehow - please continue in that direction. If not - please provide ideas/solution if you have. thanks – Joe Aug 31 '15 at 18:47
  • 1
    I'm suggesting you *don't* install that because it is **too new**. It depends on versions of software that RHEL 6 does not contain. And yes if you want support from RHEL I believe you do need to wait for them to package the software. I imagine if you ask them for support for something you installed externally they will tell you they won't support it and to do ask the vendor of that software. (Which isn't to say it doesn't work just that when it breaks you get to keep both pieces.) The vendor gave you software that *wiil not* work on RHEL 6 as built. Go ask them for a RHEL 6 compatible version. – Etan Reisner Aug 31 '15 at 18:55
  • This approach will take weeks easily (to ask RHEL for support). All I want is to run the software (no need to be installed). Want to test it - close it. No need to be install, run for long time etc. Also tried same software on AWS Centos and is working there without any installation. That means problem is only with GLIBC_2.15 (lack of ability to update that library). Do you know how to update / point to GLIBC_2.15 ? – Joe Aug 31 '15 at 19:52
  • You misunderstood me. I didn't tell you to ask for support. I said you probably won't be able to get any if you need it later. AWS is not stock CentOS they modify all sorts of things. RHEL/CentOS 6 does not have a glibc version with those symbols. You cannot get them without building your own glibc package/etc. If you want to use RHEL/CentOS 6 for this software you **need** a version of the software from the vendor that is built to work on RHEL/CentOS 6 and not built for some other (newer) system. – Etan Reisner Aug 31 '15 at 20:04
  • Ok. No need support later on. Is it too complicated to configure a system similar like AWS did (for parts that is needed for this library)? What they did in a 'black box' so that this software can work on their CentOS but not on stock RHEL one? – Joe Aug 31 '15 at 20:27
  • They *repackaged* huge parts of the OS. If you want to do that you can but then you don't have RHEL anymore. You have JoeOS (or whatever). Feel free to do that if you want but it isn't a simple process. – Etan Reisner Sep 01 '15 at 01:20
  • Great. I am stucked now.. – Joe Sep 01 '15 at 05:00
  • Go see if the vendor has a version of the binary intended for use on RHEL/CentOS 6. If they do, use that. If not, try using RHEL/CentOS 7 or some other more up to date system then RHEL/CentOS 6. – Etan Reisner Sep 01 '15 at 13:09
  • I have: Red Hat Enterprise Linux Workstation release 6.7 (Santiago) Is that RHEL recommended anyway or should I go for a newer version regardless of this problem with GLIBC? – Joe Sep 01 '15 at 15:01
  • That's the newest release of RHEL 6 as far as I know. RHEL 6 will never get a new enough glibc for what you want here. That's not how RHEL versioning works. If you want a newer glibc version you get to use RHEL 7 or some other distribution. – Etan Reisner Sep 01 '15 at 15:03
  • Which link should I believe about what GLIBC have specific version of RHEL?: 1) https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Developer_Guide/libraries.html#lib.version 2) http://distrowatch.com/table.php?distribution=redhat – Joe Sep 01 '15 at 15:09
  • For RHEL 6 they agree so pick whichever you want to believe.. I'm not sure why the RH docs appear to be wrong about what RHEL 7 contains though. – Etan Reisner Sep 01 '15 at 16:14
  • Naive question: Is it possible to somehow download GLIBC 2.15, put it in any folder (e.g. /tmp/myglibc) and then point to this path ONLY when executing something that needs this specific version of glibc? – Joe Sep 01 '15 at 21:31

4 Answers4

54

This often occurs when you build software in RHEL 7 and try to run on RHEL 6.

To update GLIBC to any version, simply download the package from

https://ftp.gnu.org/gnu/libc/

For example glibc-2.14.tar.gz in your case.

1. tar xvfz glibc-2.14.tar.gz
2. cd glibc-2.14
3. mkdir build
4. cd build
5. ../configure --prefix=/opt/glibc-2.14
6. make
7. sudo make install
8. export LD_LIBRARY_PATH=/opt/glibc-2.14/lib:$LD_LIBRARY_PATH

Then try to run your software, glibc-2.14 should be linked.

Linga
  • 10,379
  • 10
  • 52
  • 104
Yu Tao
  • 758
  • 5
  • 9
  • 5
    I used glibc-2.15. Therefore I had to do `touch /opt/glibc-2.15/etc/ld.so.conf` because otherwise `make install` would fail. – twigmac Oct 22 '17 at 22:37
  • 2
    Did not work in RHEL 6.5 , Gives Segementation Fault for me too. – syam Aug 03 '18 at 01:08
  • @syam in which of these installation steps, did you get the segmentation fault error? – Yu Tao Sep 10 '18 at 13:23
  • 1
    I did this, but the program I am trying to install still complains about not finding lib.so.6 (GLIBC_2.14)(64 bit)....aniy ideas? – user2494298 Feb 04 '19 at 22:31
  • Step 6: works better with `sudo make` rather than just `make`. – Ron Kalian Sep 04 '19 at 16:28
  • Great. Afters hours of struggling on other sites, I found your answer which resolved my issue. Thanks..! – Sajjad Manal Oct 21 '19 at 11:59
  • Segmentation faults you're facing because of that other binutils still depend on old libc, however since you're changing LD_LIBRARY_PATH now they're using new version which yields segmentation fault. Even basic commands like ls/cd fails. – emre can Sep 02 '20 at 08:42
1

Naive question: Is it possible to somehow download GLIBC 2.15, put it in any folder (e.g. /tmp/myglibc) and then point to this path ONLY when executing something that needs this specific version of glibc?

Yes, it's possible.

Community
  • 1
  • 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362
  • Given that this appears to be a vendor distributed binary that makes the simple "recompile it" option unavailable (that would avoid this problem entirely in the first place most likely) which just leaves the chroot (effectively an entirely different system) or the binary editing of requirements (assuming your list was exhaustive). – Etan Reisner Sep 02 '15 at 13:41
  • Sorry I did not understand what are you saying.. What is chroot and how do you do binary editing? – Joe Sep 03 '15 at 03:30
  • @Joe Did you read the linked answer? The solution is quite *non-trivial*, and if you can't be bothered to find out (by googling) what is chroot and how to do binary editing, then I am afraid your problem can't be solved by you. – Employed Russian Sep 03 '15 at 03:50
  • Yeah.. I am still beginner for those custom things. I know some stuff in Linux but never deal before with chroot and binary editing. I read the linked answer but not sure if will be easy for me to do it... – Joe Sep 03 '15 at 15:48
0

For another instance of Glibc, download gcc 4.7.2, for instance from this github repo (although an official source would be better) and extract it to some folder, then update LD_LIBRARY_PATH with the path where you have extracted glib.

export LD_LIBRARY_PATH=$glibpath/glib-2.49.4-kgesagxmtbemim2denf65on4iixy3miy/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$glibpath/libffi-3.2.1-wk2luzhfdpbievnqqtu24pi774esyqye/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$glibpath/pcre-8.39-itdbuzevbtzqeqrvna47wstwczud67wx/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$glibpath/gettext-0.19.8.1-aoweyaoufujdlobl7dphb2gdrhuhikil/lib:$LD_LIBRARY_PATH

This should keep you safe from bricking your CentOS*.

*Disclaimer: I just completed the thought it looks like the OP was trying to express, but I don't fully agree.

icedwater
  • 4,701
  • 3
  • 35
  • 50
0

download rpm packages and run the following command:

rpm -Uvh glibc-2.15-60.el6.x86_64.rpm \
glibc-common-2.15-60.el6.x86_64.rpm \
glibc-devel-2.15-60.el6.x86_64.rpm \
glibc-headers-2.15-60.el6.x86_64.rpm
zczhuohuo
  • 169
  • 1
  • 13