Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
News

Setting up Ubuntu 22.04 for Delphi 11.2 Debugging

ubuntu jammy jellyfish delphi

I created a Bash script a while back for setting up Ubuntu for Delphi development, and update it for each new release. The script automatically installs all the required packages, along with PAServer. I recently updated it again due to an LLDB debugging issue.


Error

Unable to start LLDB kernel: ‘Symbolic link target does not exist: /home/jim/PAServer/22.0/lldb/lib/libpython3.so -> /usr/lib/x86_64-linux-gnu/libpython3.6.so.1.0.
Please make sure that the target exists or update the link to point to the new Python 3 shared object file’.

image-2915022

The error is due to an updated version of Python being standard in Ubuntu 22.04 LTS Jammy Jellyfish. By default is ships wit Python version 3.10, while PAServer was hardcoded for Python 3.6. There is a known issue workaround in DocWiki to manually fix it, but I wanted to update my Bash script to do this automatically.

Solution

The fix is to update the symbolic link with whatever version of Python is installed.

  • ln -sf ➡️ Updates the symbolic link
  • ls -1 /usr/lib/x86_64-linux-gnu/libpython3.*.so.1.0 ➡️ Gets a file name matching the mask
  • tail -1 ➡️ Gets the last file (if there are more than one)
  • The pipe symbol runs the ls command through tail
  • Placing all of that inside the single left quotes executes those commands and uses that in the exterior statement
  • ~/PAServer/22.0/lldb/lib/libpython3.so ➡️ Path to the old symbolic link
  • Note: This assumes your PAServer is installed in ~/PAServer/22.0/ so you may need to adjust your path

I’ve tested this on a few different installations and it is working reliably for me, but your millage may vary. Good luck!

Script

Or you can simply use my Bash script. It is published as a GitHub Gist https://embt.co/Ubuntu4Delphi22 where you can view the source. You can download and run it right from the command-line:

I have a version for Red Hat / Fedora / CentOS too (although it isn’t as tested or updated. Sorry, I don’t use CentOS very often.)


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Director of Delphi Consulting for GDK Software USA. Many software related patents, including swipe and pattern unlock and search engines. First Silver and Gold Delphi badges on Stack Overflow Former Developer Advocate for Embarcadero Technologies. Long time fan of programming, especially with Delphi. Author, Podcaster/YouTuber, Improvisor, Public Speaker, Father, and Friend.

1 Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES