当我尝试使用 dotnet 运行程序时出现此错误:
> 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.
libhostpolicy.so
我在中找到了该文件/usr/lib/dotnet/shared/Microsoft.NETCore.App/7.0.9/libhostpolicy.so
,所以我不知道为什么 dotnet 无法访问它。
我继续阅读这里这样做可以解决这个问题:
sudo chown -R yourusername:yourusername /path/to/exe
sudo setfacl -R -d -m u:yourusername:rwx,g:yourusername:rwx,o::r /path/to/exe
但我仍然收到同样的错误。