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.

Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'libproc': The specified module could not be found.

See original GitHub issue

Steps to reproduce

Install dotnet core Update openssl with homebrew and update symlinks as per instructions: cd /usr/lib/ ln -sf /usr/local/Cellar/openssl/1.0.2k/lib/libcrypto.1.0.0.dylib libcrypto.1.0.0.dylib ln -sf /usr/local/Cellar/openssl/1.0.2k/lib/libssl.1.0.0.dylib libssl.1.0.0.dylib dotnet new console --language c#

Running new works however when it tries to restore I get this error: Failed to create prime the NuGet cache. restore failed with: 134

Unhandled Exception: System.DllNotFoundException: Unable to load DLL ‘libproc’: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Interop.libproc.proc_pidpath(Int32 pid, Byte* buffer, UInt32 bufferSize) at Interop.libproc.proc_pidpath(Int32 pid) at System.Diagnostics.Process.ResolvePath(String filename) at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start() at Microsoft.DotNet.Cli.ForwardingApp.Execute() at Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingApp.Execute() at Microsoft.DotNet.Tools.Restore.RestoreCommand.<>c__DisplayClass0_0.<Run>b__0() at Microsoft.DotNet.Cli.CommandLine.CommandLineApplication.Execute(String[] args) at Microsoft.DotNet.Tools.Restore.RestoreCommand.Run(String[] args) at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient) at Microsoft.DotNet.Cli.Program.Main(String[] args) Abort trap: 6

Expected behavior

Actual behavior

Environment data

dotnet --info output: .NET Command Line Tools (1.0.1)

Product Information: Version: 1.0.1 Commit SHA-1 hash: 005db40cd1

Runtime Environment: OS Name: Mac OS X OS Version: 10.11 OS Platform: Darwin RID: osx.10.11-x64 Base Path: /usr/local/share/dotnet/sdk/1.0.

openssl version -a OpenSSL 1.0.2h 3 May 2016 (Library: OpenSSL 1.0.2k 26 Jan 2017) built on: reproducible build, date unspecified platform: darwin64-x86_64-cc options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx) compiler: clang -I. -I… -I…/include -fPIC -fno-common -DOPENSSL_PIC -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM OPENSSLDIR: “/usr/local/etc/openssl”

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:25 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
esquivalientcommented, Sep 7, 2017

I the same issue as @tarurar and wasn’t really in a position to unset DYLD_FALLBACK_LIBRARY_PATH. Instead, I appended the directory where libproc lives to the fallback path, like this

export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/lib/

I did not investigate why this was necessary, which I would probably do if I was going to make it a permanent part of my environment (which I’m not, I’m just over here working a support ticket for a dotnet customer of ours) so caveat emptor.

1reaction
janvorlicommented, Apr 4, 2017

CoreFX has been depending on libproc from the very beginning of its port to OSX. The library name is defined here: https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/OSX/Interop.Libraries.cs And the pinvokes here: https://github.com/dotnet/corefx/blob/master/src/Common/src/Interop/OSX/Interop.libproc.cs

So, I think there can be several possible issues:

  • The libproc is not installed on the target machine - that would be very strange, libproc seems to be part of the OSX.
  • Some change in coreclr has broken lookup for interop with libraries from the system
  • Some external change causes the libproc lookup to fail

@Ox5f3759df could you please check if the following file exists? /usr/lib/libproc.dylib If it does, could you please run the following command and dump the result here? otool -L /usr/lib/libproc.dylib

Could you also run the following commands and dump their output here? I expect all of the env vars to be empty, if they are not, it might be causing the problem. echo $LD_LIBRARY_PATH echo $DYLD_LIBRARY_PATH echo $DYLD_FALLBACK_LIBRARY_PATH echo $DYLD_FRAMEWORK_PATH echo $DYLD_FALLBACK_FRAMEWORK_PATH

Read more comments on GitHub >

github_iconTop Results From Across the Web

System.DllNotFoundException: Unable to load DLL 'libproc ...
The shared library libproc.dylib we fail to load is an OSX component, it is not part of dotnet. The fact that the error...
Read more >
Unable to load DLL (Module could not be found HRESULT ...
dll ': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" means the file CAN be found BUT it's not able...
Read more >
Error:- System.DllNotFoundException
Unhandled Exception : System.DllNotFoundException: Unable to load DLL 'libpart':. The specified module could not be found. (Exception from ...
Read more >
Unable to load DLL 'IfxDotNetIntrinsicModule.dll
One of the possible cause is the dynamic library can not be located in the current system PATH. Please first try to Include...
Read more >
System.DllNotFoundException: Unable to load DLL ' ...
I get the following error message: System.DllNotFoundException: Unable to load DLL 'hppatusg01.dll': The specified module could not be found. ( ...
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