Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A fatal error was encountered. The library 'libhostpolicy.so' required

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

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

like image 214
Kiksen Avatar asked Nov 14 '17 11:11

Kiksen


People also ask

What was the fatal error encountered in Linux nopCommerce?

A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found - Linux nopCommerce no source (downloaded from the nopCommerce site) gives an error while running on a Linux machine. A fatal error was encountered.

Why did my nop420 application fail to run?

A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/var/nop420/'. Failed to run as a self-contained app. If this should be a framework-dependent app, specify the appropriate

Why does nopCommerce no source give an error while running?

nopCommerce no source (downloaded from the nopCommerce site) gives an error while running on a Linux machine. A fatal error was encountered. The library 'libhostpolicy.so' required to execute the application was not found in '/var/nop420/'.

Is it bad to install all libs at the end?

There may be some libs installed unnecessarily at the end, but it has no much harm. Did you try to change <OutputType>Library</OutputType> to <OutputType>Exe</OutputType>, as mentioned in this GitHub issue?


1 Answers

For me it was the following line that I had to add to the project file's PropertyGroup section that did the trick:

<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> 

Project file excerpt

like image 167
Rodion Sychev Avatar answered Sep 20 '22 04:09

Rodion Sychev