Mohamed Ali GHOUMA
Mohamed Ali GHOUMA

Reputation: 11

A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/var/www/app/>

I am running dotnet core 1.9 console project. Ran into the following error when trying to run it from Debian11.

steps to build and deploy to nginx service: dotnet clean dotnet restore -r debian-x64 dotnet build -r debian-x64 dotnet publish . -c Release -r debian-x64 -o /var/www/app

logs of the nginx service: A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in Failed to run as a self-contained app. The application was run as a self-contained app because '/var/www/app/ApiServices.runtimeconfig.json' If this should be a framework-dependent app, add the '/var/www/app/ApiServices.runtimeconfig.json' api.service: Main process exited, code=exited, status=131/n/a api.service: Failed with result 'exit-code'

Upvotes: 0

Views: 352

Answers (1)

Mohamed Ali GHOUMA
Mohamed Ali GHOUMA

Reputation: 11

Because this version of dotnet is not supported.

The solution is to upgrade to new version of dotnet core.

Upvotes: 1

Related Questions