Error Loading Native Library in Docker .NET 6
See original GitHub issueI am not sure whether this is a supported use case, but it has been working just fine in .NET 5 for us, I ended up updating everything to .NET 6 and gui.cs is breaking on loading native library, strangely it doesn’t seem to mention which library at all. Docker image is just based off mcr.microsoft.com/dotnet/runtime:6.0, nothing added to it.
I have attached the stack trace below, let me know if more information is necessary
Stack Trace:
Curses failed to initialize, the exception is: System.IO.IOException: Error loading native library ""
at Unix.Terminal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives, Boolean isFullPath)
at Unix.Terminal.Curses.LoadMethods()
at Unix.Terminal.Curses.FindNCurses()
at Unix.Terminal.Curses.initscr()
at Terminal.Gui.CursesDriver.Init(Action terminalResized)
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at Unix.Terminal.Curses.doupdate()
at Terminal.Gui.CursesDriver.Init(Action terminalResized)
at Terminal.Gui.Application.Init(Func`1 topLevelFactory, ConsoleDriver driver, IMainLoopDriver mainLoopDriver)
at Terminal.Gui.Application.Init(ConsoleDriver driver, IMainLoopDriver mainLoopDriver)
....
Issue Analytics
- State:
- Created 2 years ago
- Comments:37
Top Results From Across the Web
Error Loading Native Library in Docker .NET 6 · Issue #1513
cs is breaking on loading native library, strangely it doesn't seem to mention which library at all. Docker image is just based off...
Read more >Error loading native library "/app/runtimes/linux ...
I'm build a web API app using .NET core and gRPC for Csharp. In Local, It work verry well, but when I build...
Read more >[Solved]-Error loading native library "/app/runtimes/linux/native ...
Coding example for the question Error loading native library "/app/runtimes/linux/native/libgrpc_csharp_ext.x64.so - Grpc Core on Docker container-docker.
Read more >Debugging native library dependencies on Linux
I'm trying to run my C# app (Net 5) in a docker Linux container on my Windows 10 Pro system. I get this...
Read more >How to Handle the UnsatisfiedLinkError Runtime Error in ...
The Java java.lang.UnsatisfiedLinkError is thrown when a program uses a native libaray but is unable to find it at runtime for some reason....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Leave off the .so. For Ubuntu the packages are named libncursesw5 and/or libncursesw6.
Like I said, I’ve hardly used this library in Linux, and never with a container.
EDIT: I don’t know if this helps, but it seems to be discussing exactly your problem.
With the original Dockerfile it’s possible get it to work with this modification: