0

Coming from here→ libc.so.6: version `GLIBC_2.16' not found I see that is somewhat possible to run a programs against a library that is not hard installed in the OS.

I would want to know how to put a libc6 updated in a place of the system (but without installing it) and linking it to a small program to run (HipHop in this case).

However, although I am in 11.10 and the best way would be installing an updated OS, I want to know how to do this, because this can happen in other situations (like installing old libs in a new system), and I don't know how to do it.

In short: I would want to know if it is possible to "pack" a set of libs in a place in the system, but without having conflicts with the installed ones in order to run old programs or in other to run new programs in old versions of Ubuntu.

Thanks

ps. this is my first question here and I am also not english native, so if I made a error to post it here, please don't ban me, just say me politely what I did wrong.

  • My answer in the question you referenced explains exactly that. What is unclear to you? How to make a folder of system libs? debootstrap tool is your friend. – Barafu Albino Jun 05 '14 at 13:31
  • debootstrap is not my friend. – user288697 Oct 08 '14 at 23:15
  • ...specially if nobody explain me how to use it.

    If the question is not clear, I will ask again: I want to run applications that need new libc6 under Ubuntu 11.10, so I need a modern Ubuntu not "sid" Debian.

    Well, this is totally useless I will try in another forum.

    – user288697 Oct 08 '14 at 23:30

1 Answers1

0

You have many possibilities.
1) Prepare a whole set of updated libraries. Put them in, say, /catbed. Then just run

/catbed/ld-linux.so.3 --library-path=/catbed:/whatever-else /usr/bin/app

2) Even better, use chroot. And debootstrap. And schroot

3) Even better, override LD_LIBRARY_PATH when running your app.

  • But I don't know command catbed is. I do "whereis catbed" and nothing is found, and also "sudo apt-get install catbed" do not found that.

    Copied from the other question, because someone delete it:

    "Prepare a whole set of updated libraries. how? Why /catbed? what it means catbed? If I put those unknown libraries on /newlibs I would have a problem? Since when a command start with a directory, without ./ ? What is the "whatever-else" you mentioned?"

    – user288697 Jun 05 '14 at 19:57
  • Anyway I will investigate those commands... – user288697 Jun 05 '14 at 19:58
  • OK, I figured out the catbed thing and the whatever else but I didn't know how to do the other things.

    So I just put libc6 in /newlibs and ld-linux.so.3 (where I have to download it?) why not just use sudo mkdir /newlibs? 3) I don't know how to override library's path.

    – user288697 Jun 05 '14 at 20:07
  • I am totally lost. I did sudo mkdir /newlibs Then I downloaded libc6 from here → http://packages.ubuntu.com/trusty/libc6 I extracted, and put the content of the lib folder in /newlibs and then I run:

    /newlibs/ld-linux.so.2 --library-path=/newlibs:/newlibs/i386-linux-gnu/ /home/alberto/Descargas/HipHop/HipHop

    but it says:

    --library-path=/newlibs:/newlibs/i386-linux-gnu/: error while loading shared libraries: --library-path=/newlibs:/newlibs/i386-linux-gnu/: cannot open shared object file: No such file or directory

    I tried more combinations but it doesn't seem to work.

    – user288697 Jun 05 '14 at 20:33
  • --library path overides all other paths. You should add paths to /usr/lib and others, separated by : after your own paths. Anyway, better try debootstrap to create a folder with all libraries in it. – Barafu Albino Jun 06 '14 at 06:48
  • and there is any method to do that or not? – user288697 Jun 06 '14 at 16:44
  • This reply is short, and didn't give me the required information. – user288697 Jun 09 '14 at 11:26
  • You didn't solved my question. – user288697 Oct 08 '14 at 23:16