0

When I try to run a program using dotnet I get this error:

> dotnet OmniSharp.exe
A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in 'path/to/exe'.
Failed to run as a self-contained app.

I found the file libhostpolicy.so in /usr/lib/dotnet/shared/Microsoft.NETCore.App/7.0.9/libhostpolicy.so, so I have no idea why dotnet can't access it.

I read on here that doing this will solve it:

sudo chown -R yourusername:yourusername /path/to/exe
sudo setfacl -R -d -m u:yourusername:rwx,g:yourusername:rwx,o::r /path/to/exe

but I still get the same error.

  • You have already started on a Path To Disaster! (scary music).. You have changed your system without understanding what the changes do. Now that the "magic" didn't work, can you restore your system to the previous state? Can you "undo" the cgange? – waltinator Aug 02 '23 at 18:29
  • 1
    "I read on stackoverflow ... ". You didn't even tell us which! Telling us which remote procedure (RP) you "followed" doesn't help us help you for N reasons: 1) It's remote. Will the link exist tomorrow? 2) Reading the RP doesn't tell us how accurately you "followed" it. Did you suffer typos or missed lines? We have. 3) Reading the RP omits the error messages you got on your system. These error messages (and the commands that caused them) are key elements in any diagnosis. – waltinator Aug 02 '23 at 18:37
  • @waltinator I have edited the question to include the link to the post. All I did was run the commands I wrote in my post – Abdulmalek Almkainzi Aug 03 '23 at 09:03
  • @waltinator if you don't know just say you don't. The system works fine and I found a work around. – Abdulmalek Almkainzi Aug 03 '23 at 18:28

0 Answers0