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.

Can't run off fresh install. Unable to load DLL 'libc':

See original GitHub issue

I’m trying to install dotnet on my Mac following the instructions here: https://www.microsoft.com/net/core#macos

However when I try the command “dotnet new” I get the following error:

Anands-MacBook-Pro:~ anandx$ dotnet new

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.InternalAbstractions.RuntimeEnvironment' threw an exception. ---> System.PlatformNotSupportedException: Error reading Darwin Kernel Version ---> System.DllNotFoundException: Unable to load DLL 'libc': The specified module could not be found.
 (Exception from HRESULT: 0x8007007E)
   at Microsoft.DotNet.InternalAbstractions.Native.NativeMethods.Darwin.sysctl(Int32* name, UInt32 namelen, Byte* oldp, UInt32* oldlenp, IntPtr newp, UInt32 newlen)
   at Microsoft.DotNet.InternalAbstractions.Native.NativeMethods.Darwin.GetKernelRelease()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.InternalAbstractions.Native.NativeMethods.Darwin.GetKernelRelease()
   at Microsoft.DotNet.InternalAbstractions.Native.PlatformApis.GetDarwinVersion()
   at Microsoft.DotNet.InternalAbstractions.Native.PlatformApis.GetOSVersion()
   at Microsoft.DotNet.InternalAbstractions.RuntimeEnvironment..cctor()
   --- End of inner exception stack trace ---
   at Microsoft.DotNet.InternalAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
   at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
   at Microsoft.DotNet.Cli.Program.Main(String[] args)
Abort trap: 6

Any idea whats going on? I assume since it can’t find libc its some path issue?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13

github_iconTop GitHub Comments

5reactions
vidstigecommented, Sep 18, 2016

DYLD_FALLBACK_LIBRARY_PATH=/usr/lib:/opt/local/lib dotnet new

0reactions
veeral-patelcommented, Apr 6, 2018

Can confirm @vidstige’s solution works on Mac OS Sierra in Visual Studio Code. Thanks so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve the DLL cannot be found issue
Put the dll in the same folder as the executable. Do that by creating an installer that installs your application + required dlls....
Read more >
How to Fix Unable to Load DLL/Error ...
Method 1: Reinstall the Program; Method 2: Disable the Auto-Startup of the Program; Method 3: Clean the Residual Registry; Method 4: Re-Register ...
Read more >
Unknown Tmodloader Error (System.DllNotFoundException
Terrarian · Go to Steam and right-click Terraria and click 'Properties' · Click 'Local Files' tab and then click 'Browse Local Files' ·...
Read more >
Program won't run because of small difference in version ...
I have a program that I compiled on one x64 (Ubuntu) system that won't run on another x64 (Debian) system. I'd like to...
Read more >
Steam/Game-specific troubleshooting - ArchWiki
If the game crashes with one or both of the above mods enabled when loading a save or starting a new game but...
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