微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Microsoft.InformationProtection.File.Ubuntu1804-libmip_dotnet.so的加载库失败

如何解决Microsoft.InformationProtection.File.Ubuntu1804-libmip_dotnet.so的加载库失败

我想在netcore3.1控制台应用程序中使用Microsoft.informationProtection.File.Ubuntu1804。我使用以下命令发布了我的应用程序:

dotnet publish MipConsole.csproj -o ../publish -f netcoreapp3.1 -c Release -r linux-x64

当我在docker映像(mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic)中运行它时,出现以下错误

Unhandled exception. System.ComponentModel.Win32Exception (0x80004005): LoadLibrary Failed for: [/publish/libmip_dotnet.so]
   at Microsoft.informationProtection.Utils.SafeNativeMethods.LoadLibrary(String dllToLoad)
   at Microsoft.informationProtection.Utils.Loader.LoadDlls(String dllFolder,String dllName,String[] dllDependencies)
   at Microsoft.informationProtection.MIP.Initialize(MipComponent mipComponent,String path)
   at MipConsole.Program.Main(String[] args)
   at MipConsole.Program.<Main>(String[] args)

在另一篇文章中,Windows应用程序的解决方案是安装VC ++可再发行组件...但是Ubuntu的解决方案是什么?

解决方法

我正在努力对此进行记录。您可能会缺少Ubuntu的MIP SDK依赖项。您可以通过以下方式安装它们:

sudo apt-get install libgsf-1-dev libssl-dev libsecret-1-dev freeglut3-dev libcpprest-dev libcurl3-dev uuid-dev

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。