Unable to run Rest Server on Linux

I had previously run this project (Rest Server) in Sep 2023 with an earlier version of Delphi.

I am on Delphi 12

I have installed its PAServer, which is connecting fine

After building and when I attempt to run it, I receive this

Symbolic link target does not exist for a python library.

When I look at the files and symlinks on the server, some are dated Sep 2023. I am guessing they are incorrect. How do I fix it?

On Linux, I cleared out the PAServer folder and reinstalled PAServer.

It installs and runs fine. But when I try to run my Rest Server (which used to run fine a few years ago), I still get the same error.

  1. The symlink libpython2.so does exist.
  2. But the folder x86_64-linux-gnu does not. And I dont see why it would exist.
  3. Python 3.7 does not exist. There is a Python 3.6 on the server.

What is going on?

Does this help?

2 Likes

Thanks Vincent, its in the right direction. Unfortunately that lib does no exist.

Looking around the server, x86_64-linux-gnu directory does not exist. So, I am guessing that perhaps python is not installed.

I see these files in usr/lib

python3.6
 site-packages
   easy_install.py
   pip
   pip-9.0.3.dist-info
   pkg_resources
   __pycache__
   setuptools
   setuptools-39.2.0.dist-info

Does anyone know how to install python

Did you already create the symlink? It doesn’t look like you did. From what you’re showing in the screenshot you have Python 3.6 installed and simply need to create the symlink for it to work.

Look at this Gist: setupubuntu4delphi23-sh ¡ GitHub

Line 23 in that Gist shows you how to create the necessary symlink. You might need to adjust it for whatever version of PAServer you are using but it should fix the problem. :slight_smile:

The reason I cant correct the symlink is that I cant find any .so or a path with x86 in it.

  • Is it that Delphi does not support ARM Linux anymore, but previous versions did
  • Is it because my host has changed from X86 to ARM and Delphi cant deploy to it.

Delphi has never supported arm linux.

1 Like
  1. While waiting for support, I decided to upgrade from 12 to 12.2. I had a few issues with this. It kept telling me I had run out of space, which was incorrect. I pruned the env path and it seemed to fix that.
  2. Therefore, I had to update PAServer on Linux.
  3. On deploy/debug, its very different in its requirements and gives truncated error messages. Had I not seen the full message with the previous version, I wouldn’t have known what the problem was. The symlinks were wrong again.
  4. On my host, at least, all the libs are in lib64, not lib.
  5. Still, without a GUI, it took a while to test each symlink (some were hidden) to find the invalid one. It was python3.so. I fixed it.
  6. Now I get this array of error messages. Any clues anyone. I have used Unix 40+ years ago, so I am very rusty with Linux commands

/home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi) /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26’ not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi)
/home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi) /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21’ not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi)
/home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.22' not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi) /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libm.so.6: version GLIBC_2.29’ not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/…/lib/liblldb.so.15)
/home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.26' not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/../lib/liblldb.so.15) /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20’ not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/…/lib/liblldb.so.15)
/home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/../lib/liblldb.so.15) /home/username/paserver/PAServer-23.0/lldb/bin/lldb-mi: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21’ not found (required by /home/username/paserver/PAServer-23.0/lldb/bin/…/lib/liblldb.so.15)

Linux version is 3.10.0-962.3.2.lve1.5.81.el7.x86_64

When it comes to help with Linux, you need to be specific about the exact operating system you are running. Delphi supports multiple Linux flavours and versions and whilst some work out of the box, others need adjustments or libraries installed.

To check the current OS version in Linux, open the command line and use one of the commands like “cat /etc/os-release”, “lsb_release -a”, “hostnamectl”, or “uname -r”

1 Like

Just as an aside here - did you actually raise a support ticket? You emailed me directly and I’ve given you some steps to take. You didn’t mention that you’d opened a support ticket with the support team (which is likely to give you a much better result!)

Also, important to note - Linux is NOT Unix. In fact, in many ways GNU/Linux is quite different and even Unix itself had many variations such as BSD and SYSTEM V.

As other commenters have mentioned, with Linux the version or ‘flavor’ if you like, is quite important since there can be quite significant differences between the distros. You mentioned, in an email to me, that you were working with Linux via CPANEL - that implies you’re running on a shared host designed to be a web server. That could have some impact on what you’re doing too.

II think if you take a step back and try to explain what the end result is you’re trying to achieve for your customer and the types of eventual deployment of the apps you’re aiming for it might be easier to get some coherent advice. Right now, you’re asking people to trouble-shoot a broken install on Linux when that might not even be something you need to deal with.

I had tried a REST server on Linux on the same host as I am with now, in 2021. And it had worked. Based on that, I had quoted on a project.

Unfortunately, the host has improved and so has Delphi. But it doesn’t work anymore. I will raise a support ticket.

If there are various flavours of linux, then why isn’t there a sheet of common requirements and tweaks required.

Please run one of the below commands from section 1 and then from section 2 (the first that works) and post the results. This could be solved in 20 minutes if you can provide the correct information to troubleshoot.

  1. open the command line and use one of the commands like “cat /etc/os-release”, “lsb_release -a”, “hostnamectl”, or “uname -r”

  2. Terminal Command: Open your terminal and input arch or uname -m

From the questions you asked earlier, it seems you are running Linux ARM - PAServer wiil not work on it. Unlike MacOS and Windows ARM, Linux ARM does not have any emulation ability for x86 - so no amount of fiddling is going to make x86 PAServer run.

Delphi has never supported Linux arm.