0

My Machine is slackware linux 64 kernel 3.0.4. For this machine I don't have root access and the administrator is not available.

I am trying to run a program that requires the library file libc version 2.14 and the one installed in /lib64 is libc-2.13.

I have an identical machine where I have root access. I tried copying the libc-2.14 file from this machine to the first one then place it into a $HOME/lib64 folder and adding this folder to LD_LIBRARY_PATH, then make a new symbolic link libc.so.6 to point to the libc-2.14 file but the program keeps reading the libc.so.6 file in the /lib64 which points to libc-2.13. I can't modify anything in the /lib64 because I am not root.

Is there anyway to get around this? Thanks in advance

nytrook
  • 51
  • 8

1 Answers1

0

You need to copy other files from glibc, too. You will need the program interpreter /lib64/ld-linux-x86-64.so.2, and perhaps also libdl.so.2, libm.so.6, libpthread.so.0 and more of these helper libraries.

Once you have these, you can try to launch arbitrary programs with the other glibc using an explicit dynamic linker invocation. Assuming that you have copied the files into the current directory, you can try this:

./ld-linux-x86-64.so.2 --library-path . --inhibit-cache /bin/bash

Note that this only applies to the directly launched binaries (bash in the example). Child processes (commands launched from the shell) will again use the system glibc.

There could still be problems if you did not copy all the required glibc libraries, or if there have been incompatible changes in the locale format, so that the new glibc cannot use the system locales.

Florian Weimer
  • 32,022
  • 3
  • 48
  • 92
  • I tried your suggestion and I got `FATAL: kernel too old`. I then checked the kernel version and I just noticed that the machine I'm copying the files from has kernel 3.10 and the one I have is 3.0.4. This, I assume, complicates the situation further. Am I doomed or is there a way around this? – nytrook Jul 26 '17 at 13:23
  • You could still compile glibc yourself (glibc 2.14 upstream most definitely does not require a 3.10 kernel). Or copy glibc 2.17 from a Red Hat Enterprise Linux 7 or CentOS 7 system, which has been compiled to work with a 2.6.32 or later kernel. – Florian Weimer Jul 26 '17 at 13:28
  • I compiled glibc but now when I run `./ld-linux-x86-64.so.2 --library-path . --inhibit-cache /path-to-program` I get a `Segmentation Fault` error. – nytrook Jul 27 '17 at 07:52
  • So, sadly, this issue isn't resolved and every step seems to complicate the situation further. I'd better wait for the sys admin to come back and update the system. Since you're the one how helped the most, you get the tick. Thanks anyways. – nytrook Jul 28 '17 at 08:47
  • 1
    This answer is mostly a duplicate of https://stackoverflow.com/a/851229/50617, but with fewer details. – Employed Russian Jul 29 '17 at 04:48