Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: viselike on July 14, 2023, 06:56:07 AM
-
I'm trying to run Embarcadero's PAServer (https://docwiki.embarcadero.com/RADStudio/Sydney/en/PAServer,_the_Platform_Assistant_Server_Application (https://docwiki.embarcadero.com/RADStudio/Sydney/en/PAServer,_the_Platform_Assistant_Server_Application)) on TinyCore, and it fails with just the message "/bin/sh: ./paserver: not found"
As far as I understand, it fails to find some library, but which one? Is it possible to find this out?
What I've tried already:
- use strace. It elaborated only that the error happens in the execve call.
- run "ldd -v" on Ubuntu and install all these packages on TinyCore
- run the app with sudo
So, is there any way to find out which library it does not find?
-
Typically that message means it cannot find bash, perl, python or similar.
-
Python was already present there, adding bash to the image didn't help, and I know no other "complex dependencies" like perl it might need.
For example, on Ubuntu all it needs is:
apt-get -yy install \
build-essential \
libcurl4-openssl-dev \
libcurl3-gnutls \
libgl1-mesa-dev \
libgtk-3-bin \
libosmesa-dev \
libpython3.10 \
xorg
And on TinyCore I tried to add all following packages:
RUN tce-load -wic \
python3.9
RUN tce-load -wic glibc_base-dev
RUN tce-load -wic glibc_add_lib
RUN tce-load -wic glibc_apps
RUN tce-load -wic glibc_gconv
RUN tce-load -wic glibc_i18n_locale
RUN tce-load -wic libGL
RUN tce-load -wic curl
RUN tce-load -wic curl-dev
RUN tce-load -wic curlg
RUN tce-load -wic curlg-dev
RUN tce-load -wic gtk3
RUN tce-load -wic gtk3-dev
RUN tce-load -wic gtk3-gir
RUN tce-load -wic Xorg-7.7
RUN tce-load -wic zlib_base-dev
RUN tce-load -wic coreutils
RUN tce-load -wic util-linux
RUN tce-load -wic bash
Perhaps there is any tool to not guess, but see for sure, which file it has not found?
-
Locate your file 'paserver'
find /places -name paserver
Check file type
file /path/to/paserver
If it's any type of script, check the shebang
head -n1 /path/to/paserver
Usually you'll see what you're looking for this way.
Like Juanito said, typically bash and stuff.
-
Locate your file 'paserver'
find /places -name paserver
It's a docker image I am creating myself, so both locations where I put the paserver are well known to me - it's a root and tmp folder:
/ $ find / -name paserver
/tmp/PAServer-22.0/paserver
/paserver
Check file type
file /path/to/paserver
file fails with the same error:/ $ file /paserver
/bin/sh: file: not found
But it's an ELF executable:
/ $ od -t c /paserver | head -n 2
0000000 177 E L F 002 001 001 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000020 002 \0 > \0 001 \0 \0 \0 300 341 ~ \0 \0 \0 \0 \0
Btw, the paserver tool itself is available at https://altd.embarcadero.com/releases/studio/22.0/113/LinuxPAServer22.0.tar.gz (https://altd.embarcadero.com/releases/studio/22.0/113/LinuxPAServer22.0.tar.gz)
-
Hi viselike
... file fails with the same error:/ $ file /paserver
/bin/sh: file: not found
...
No, that error means file.tcz is not installed.
Also, see what this returns:
ldd Path/To/paserver | grep -i found
-
Hi Rich
/bin/sh: file: not found
...
No, that error means file.tcz is not installed.
Indeed, thanks. Here what the file gives:
/ $ file /paserver
/paserver: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=725d773692b6f962a395205c93c4c7ba409d6ca1, with debug_info, not stripped
Also, see what this returns:
ldd Path/To/paserver | grep -i found
Nothing if grep for "found":
/ $ ldd /paserver | grep -i found
/ $
And here is the full output:
/ $ ldd /paserver
linux-vdso.so.1 (0x00007fff1454a000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fb6f532f000)
libc.so.6 => /lib/libc.so.6 (0x00007fb6f5173000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fb6f516e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fb6f5169000)
libm.so.6 => /lib/libm.so.6 (0x00007fb6f50a9000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fb6f5094000)
/lib64/ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x00007fb6f5354000)
-
/ $ file /paserver
/paserver: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=725d773692b6f962a395205c93c4c7ba409d6ca1, with debug_info, not stripped
/ $ ldd /paserver
linux-vdso.so.1 (0x00007fff1454a000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fb6f532f000)
libc.so.6 => /lib/libc.so.6 (0x00007fb6f5173000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fb6f516e000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007fb6f5169000)
libm.so.6 => /lib/libm.so.6 (0x00007fb6f50a9000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007fb6f5094000)
/lib64/ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x00007fb6f5354000)
You're using a pre-compiled binary and it's looking for /lib64/ld-linux-x86-64.so.2
A simple fix would be
sudo ln -s /lib /lib64
You'll need to backup that softlink if you wanna keep it persistent.
I would modify /opt/bootlocal.sh instead of putting that in /opt/.filetool.lst
It saves space
-
You're using a pre-compiled binary and it's looking for /lib64/ld-linux-x86-64.so.2
A simple fix would be
sudo ln -s /lib /lib64
This fixed the problem. Thanks, polikuo, and all others!
You'll need to backup that softlink if you wanna keep it persistent.
It's a Docker image, so I will add a link creation command to the Dockerfile.