遇到致命错误。需要库“ libhostpolicy.so” [英] A fatal error was encountered. The library 'libhostpolicy.so' required

查看:2129
本文介绍了遇到致命错误。需要库“ libhostpolicy.so”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行dotnet core 2.0控制台项目。
尝试从Docker运行时遇到以下错误。


遇到致命错误。在'/ app'中找不到库'libhostpolicy.so'需要
来执行应用程序。



方案

经过一番搜索,我发现了这一点:



希望这可以帮助其他人并获得更高的水平在Google搜索上。


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'.

解决方案

After some googleing I found this:
https://github.com/aspnet/aspnet-docker/issues/301

I'm not certain what caused it but it seems to have gone away. It's probably because I had a case mismatch of appSettings.json instead of appsettings.json which meant that the file was not being loaded. Terrible error though.

In my case it was that I had forgot to put appsettings.json to copy on builds.

Hope this helps someone else and get's higher on google searches.

这篇关于遇到致命错误。需要库“ libhostpolicy.so”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆