jeudi 15 janvier 2015

error while loading shared libraries: libc.so.6: cannot open shared object file


I have a linux kernel so I chroot it on /var/chroot:


I added bash dependencies like so:



ldd /bin/bash
linux-vdso.so.1 => (0x00007fff9a373000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f24d57af000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f24d55ab000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f24d51eb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f24d59f8000)


Then I did:



# cd /var/chroot/
# mkdir bin/ lib64/ lib/
# cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/
# cp /lib/x86_64-linux-gnu/libdl.so.2 lib/
# cp /lib/x86_64-linux-gnu/libc.so.6 lib/
# cp /lib64/ld-linux-x86-64.so.2 lib64/
# cp /bin/bash bin/


after that:



# chroot /var/chroot


Now when I want to run commands like ls I have the following error:



ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory


Aucun commentaire:

Enregistrer un commentaire