首页 > 解决方案 > 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++ redistributable... 但是 Ubuntu 的解决方案是什么?

标签: microsoft-information-protection

解决方案


我正在努力记录这一点。您可能缺少 Ubuntu 的 MIP SDK 依赖项。您可以通过以下方式安装它们:

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

推荐阅读