2

While I am installing chef , I am getting below error.

[root@centos Tools]# chef-server-ctl reconfigure
/opt/opscode/embedded/bin/ruby: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/opscode/embedded/lib/libruby.so.2.1)
/opt/opscode/embedded/bin/ruby: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /opt/opscode/embedded/lib/libruby.so.2.1)

I have downloaded glibc-2.14.1.tar.gz and glibc-2.17.tar.gz sources and compiled manually with --prefix location as /home/virt02/lib but still no use. Getting same above error.

Update : I did

[root@centos Tools]# cat /etc/ld.so.conf.d/randomLibs.conf
/home/virt02/lib
[root@centos Tools]# ldconfig
[root@centos Tools]#

Update :

[root@centos ~]# ldd /opt/opscode/embedded/lib/libruby.so.2.1
/opt/opscode/embedded/lib/libruby.so.2.1: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/opscode/embedded/lib/libruby.so.2.1)
/opt/opscode/embedded/lib/libruby.so.2.1: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /opt/opscode/embedded/lib/libruby.so.2.1)
        linux-vdso.so.1 =>  (0x00007ffce97a7000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fab5317c000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fab52f77000)
        libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fab52d40000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fab52abc000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fab52727000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fab53883000)
        libfreebl3.so => /lib64/libfreebl3.so (0x00007fab52524000)
[root@centos ~]# ldd /lib64/libc.so.6
        /lib64/ld-linux-x86-64.so.2 (0x00007f0151e36000)
        linux-vdso.so.1 =>  (0x00007fff952ee000)
[root@centos ~]#

But still not working.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Raja G
  • 5,749
  • 12
  • 44
  • 67
  • 1
    Do `strace -f -v -s150 -o log chef-server-ctl reconfigure` and post `log` to pastebin. –  Dec 28 '15 at 11:12
  • http://pastebin.com/S598qt2i @siblynx – Raja G Dec 28 '15 at 11:15
  • If your distribution does not provide newer glibcs to you (I am sure this is default and not going to be changed in near future), then you need to modify path to dynamic linker in your executables that load libraries that require those newer glibcs. Or run it directly with newer dynamic linker which must be somewhere in your `/home/virt02/lib`. –  Dec 28 '15 at 11:36
  • So please post additional output of `readelf -l /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl` to pastebin. –  Dec 28 '15 at 11:37
  • [root@centos Tools]# readelf -l /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl readelf: Error: Not an ELF file - it has the wrong magic bytes at the start readelf: Error: /opt/opscode/embedded/service/omnibus-ctl/chef-server-ctl: Failed to read file header [root@centos Tools]# – Raja G Dec 28 '15 at 11:56
  • @siblynx Hi ,Please find above attached output. – Raja G Dec 28 '15 at 12:03
  • Not sure if my solution will ever suit you. Do you understand the basics of how dynamic linking on Linux works? And this is unfortunate that file was not an ELF - from strace, it looks like so, or I am too missy today :-( –  Dec 28 '15 at 12:28
  • Please post the output of `ldd /opt/opscode/embedded/lib/libruby.so.2.1` and `ldd /lib64/libc.so.6`. Thanks. – devnull Dec 30 '15 at 14:31
  • @DevNull Hi , thanks for responding http://pastebin.com/U65e8rDF – Raja G Dec 30 '15 at 17:35
  • past the output of this command $ldd /opt/opscode/embedded/bin/ruby – PKumar Dec 30 '15 at 17:40
  • @PKumar http://pastebin.com/A1LwT3iM – Raja G Dec 30 '15 at 17:48
  • 1
    Have you tried setting all the env vars to the location of the .so? I.e. `LIBRARY_FLAGS` before compiling (linking, actually) and `LD_LIBRARY_FLAGS` before executing? If you don't set it I guess the system's .so is going to be used (might be of a lower version). In your ldd output, clearly `/lib64`'s libc is being used. – Alex Dec 30 '15 at 19:16
  • Can you do the following: `rpm -qf /lib64/libc.so.6` and tell us what package provides this library. My guess is that this `so` file is still from CentOS, which doesn't have GLIBC_2.14. You can check that by doing `nm /lib64/libc.so.6 | grep GLIBC_2.1` – iamauser Dec 30 '15 at 19:42

0 Answers0