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.

raise "Unable to load shared library 'kernel32.dll' or one of its dependencies" on ubuntu

See original GitHub issue

Prerequisites

The issue tracker is used to report bugs and request new features, NOT to ask questions.

Questions should be posted to the users mailing list which can be accessed at https://ironpython.groups.io/g/users.

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you perform a cursory search?

Description

I build the ironPython with asp.net core and run with Kestrel. I need run python script in ubuntu to call darknet(yolo) which is a AI lib. When the script call get_metadata in libdarknet.so and return a c pointer ironPython throw exception message “Unable to load shared library ‘kernel32.dll’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32.dll: cannot open shared object file: No such file or directory”.

Stack Trace list blow

System.DllNotFoundException: Unable to load shared library ‘kernel32.dll’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libkernel32.dll: cannot open shared object file: No such file or directory at IronPython.Modules.NativeFunctions.CopyMemory(IntPtr destination, IntPtr source, IntPtr Length) at IronPython.Modules.ModuleOps.CreateCData(IntPtr dataAddress, PythonType type) at InteropInvoker(IntPtr , Object , Object[] ) at CallSite.Target(Closure , CallSite , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Scripting.Interpreter.DynamicInstruction3.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.FuncCallInstruction6.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at PythonApplication.PythonApp.Execute(IContainerContext context, CancellationToken cancellationToken) in J:\工作区\TFSService\Eos\SjtuAi\PythonContainer\PythonApp.cs:line 28 fail: Microsoft.AspNetCore.Server.Kestrel[13] => ConnectionId:0HLJT8HECDLTL => RequestId:0HLJT8HECDLTL:00000001 RequestPath:/darknet/darknet.py Connection id “0HLJT8HECDLTL”, Request id “0HLJT8HECDLTL:00000001”: An unhandled exception was thrown by the application.

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on…]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

You can get this information from executing ipy -V.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sloziercommented, Jan 18, 2019

In theory https://github.com/IronLanguages/ironpython2/pull/579 should resolve this issue, however I haven’t tried with your specific example.

0reactions
sloziercommented, Jan 21, 2019

Glad it’s working. Please let us know if you run into other issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to load shared library 'kernel32.dll' - docker
DllNotFoundException: Unable to load shared library 'kernel32.dll' or one of its dependencies. In order to help diagnose loading problems, ...
Read more >
Unable to load shared library 'user32.dll' or one of its ...
Unable to load shared library 'user32.dll' or one of its dependencies. Greetings. I have an api made in asp.net core hosted on Azure...
Read more >
[Solved]-Unable to load shared library 'kernel32.dll' or one ...
Coding example for the question Unable to load shared library 'kernel32.dll' or one of its dependencies-docker.
Read more >
NET Core app for ubuntu - Kernel32 LoadLibrary issue
"Unhandled exception. System.DllNotFoundException: Unable to load shared library 'kernel32.dll'". Please let me know your inputs to make it work ...
Read more >
Unable to load shared library 'advapi32.dll' or one of its ...
dll is an unusual file extension for shared libraries on linux. It also seems to be the case that the test results are...
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