I'm trying to running steamcmd in a jailed user, but it require some dependecy (lib32gcc1) and i copied it to the jailed user. It still gave me this error: Code: /home/default_utit/steamcmd/linux32/steamcmd: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory How can i fix that?
Copy librt.so.1 to your jailed environment. (note it's probably a symlink to the actual .so file, so depending on how you copy it, make sure you don't just end up with a broken symlink)
Don't know what OS you have offhand, but in Debian: Code: [email protected]:~# cat /etc/issue Debian GNU/Linux 8 \n \l [email protected]:~# locate librt.so.1 /lib/x86_64-linux-gnu/librt.so.1 [email protected]:~# ls -l /lib/x86_64-linux-gnu/librt.so.1 lrwxrwxrwx 1 root root 13 Feb 29 10:29 /lib/x86_64-linux-gnu/librt.so.1 -> librt-2.19.so [email protected]:~# dpkg -S /lib/x86_64-linux-gnu/librt.so.1 libc6:amd64: /lib/x86_64-linux-gnu/librt.so.1
the os is debian jessie, for me the locate command don't say anything, but the same program runned out of the jail works well
Try 'ldd /home/default_utit/steamcmd/linux32/steamcmd' or even just 'find / -name librt.so.1'. (ldd will tell you the locations of all shared libraries used by a compiled binary, so assuming steamcmd is not a script or similar, that might be just what you need)
i mean that the locate command runned out of the jail don't say anything this is the result of "ldd /home/default_utit/steamcmd/linux32/steamcmd" runned on the program inside the jail: Code: [email protected]:~$ ldd /home/default_utit/steamcmd/linux32/steamcmd linux-gate.so.1 (0xf77d0000) librt.so.1 => not found libm.so.6 => not found libdl.so.2 => not found libstdc++.so.6 => not found libpthread.so.0 => not found libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf761e000) /lib/ld-linux.so.2 (0xf77d3000)
And this the find out of the jail: Code: [email protected]:~# find / -name librt.so.1 /lib/x86_64-linux-gnu/librt.so.1 /lib/i386-linux-gnu/librt.so.1 /lib/i386-linux-gnu/i686/cmov/librt.so.1 /lib32/librt.so.1 /var/www/clients/client0/web33/lib/x86_64-linux-gnu/librt.so.1 [email protected]:~#
Right, it will only show you the location of files in the locate database, and the file in question is not present. (I'm surprised you even have the locate command at all inside your jail, it's surely not needed there.) Run ldd outside the jail, it will tell you the location of the libraries that need copied into the jail (librt.so.1, libm.so.6, libdl.so.2, libstdc++.so.6, libpthread.so.0). If you're installing packages into the jail, rather than just copying files, dpkg -S will tell you which packages you need, eg.: Code: [email protected]:~# dpkg -S libpthread.so.0 libc6:amd64: /lib/x86_64-linux-gnu/libpthread.so.0