After researshes, I know dll files can be used under linux system. I'm able to use them when I have a specific path to give.

Is there a path where to put them which linux look up automatically, equivalent to

C:\Windows\System32 ?

Some sites recommended usr/local/lib, but linux doesn't look there automatically.

1 Answer 1


The file /etc/ld.so.conf contains the list of directories the dynamic linker will attempt to automatically load libraries from. This file often includes other configuration files under the /etc/ld.so.conf.d directory.

After modifying this file you will need to update the cache using by running ldconfig as root.

Some distro's have other tools to manage this file for you. If the ld.so.conf file contains a comment claiming it is auto generated, you should refer to your distro's documentation on how to make changes.

  • Thanks a lot! The file you said already contain usr/local/lib. However even with the dll being there, it doesn't seems to be loaded, because as soon as I use something needing the dll, it says dll cannot be found. dll is nunit.frameworkd.dll
    – Cher
    Jul 20, 2015 at 19:26
  • Shared libraries on Linux normally have the .so extension. Are you sure this is a Linux shared library and not a Windows one? They aren't compatible. Try running file nunit.frameworkd.dll to determine the type of file. Additionally you can run ldd <executable name> and you may see the name of the library that is missing (if it is always loaded at startup) Jul 20, 2015 at 19:28
  • nunit.framework.dll: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
    – Cher
    Jul 20, 2015 at 19:32
  • so I see, it's windows so it doesn't load it? Because I don't run it directly, this is the mono compiler which uses it. But from what I understand since it's a Windows dll it's not gonna be loaded automatically?
    – Cher
    Jul 20, 2015 at 19:33
  • Ah, in this case mono is responsible for loading the .NET assembly. I wrongly assumed it was a shared library. Try adding MONO_PATH=/usr/local/lib before the name of your command Jul 20, 2015 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.