question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to run self-contained application on Ubuntu 22 (Linux-x64), error regarding libdl.so

See original GitHub issue

Describe the bug I’m getting this error when attempting to run an application I built with .NET 7, Terminal.Gui 1.10.1 targeting Ubuntu 22:

Unhandled exception. System.Exception: Curses failed to initialize, the exception is: Unable to load shared library 'libdl.so' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable.
   at Terminal.Gui.CursesDriver.Init(Action)
   at Terminal.Gui.Application.InternalInit(Func`1, ConsoleDriver , IMainLoopDriver , Boolean )
   at Terminal.Gui.Application.Init(ConsoleDriver , IMainLoopDriver )
   at Program.<Main>$(String[])
Aborted

After doing some research, I found this: https://stackoverflow.com/a/75855054

I also know that v2 is being worked on, so I tried searching on Discussions and Issues for anything about libdl.so but didn’t find anything so my apologies if this is already a known issue.

To Reproduce Steps to reproduce the behavior:

  1. Create a simple application using .NET 7 and Terminal.Gui 1.10.1
  2. Publish as a single file, self-contained application targeting linux-x64
  3. chmod +x, attempt to run the application on Ubuntu 22

Expected behavior The application should run, displaying the simple application

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.2 LTS

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
HoofedEarcommented, May 7, 2023

Confirmed that #2607 fixed it 👍 Just tested by building on Windows, targeting Linux-x64 (single file, self contained) (I used my local repo of Terminal.Gui as a reference instead of the Nuget package)

Thanks for your help with this everyone 😁

1reaction
BDispcommented, May 6, 2023

@HoofedEar with the change in the PR #2600 you can now compile in Windows and run in the Linux.

Read more comments on GitHub >

github_iconTop Results From Across the Web

libdl.so not found in search path and causes a crash #53291
Description Trying out the .NET 6 preview 4, I'm not able to run my application anymore due to a crash. Configuration .
Read more >
How to address crash due to missing libdl.so on Ubuntu 22?
1 Answer 1 ... TL;DR: This is a building issue with the application, the application was incorrectly built and linked against libdl.so. For...
Read more >
dotnet Core 3 runtime snap not found in Ubuntu Core
I have a .Net Core 3 console app published for linux-x64. I want to run it on Ubuntu Core 18. I have installed...
Read more >
DUNEURO error libdl.so.2 - Discussions - Brainstorm
Hi everyone, I was trying to use DUNEURO for the FEM forward model but I have the following error: DUNEURO> Installation path: ...
Read more >
.NET 6 is now in Ubuntu 22.04 - .NET Blog
NET 6 is now included in Ubuntu 22.04 (Jammy) and can be installed with just `apt install dotnet6`.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found