Microsoft.InformationProtection.File.Ubuntu1804 - libmip_dotnet.so 加载库失败
Microsoft.InformationProtection.File.Ubuntu1804 - Load library failed for 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)
在其他 post 中,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
我想在 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)
在其他 post 中,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