microsoft-information-protection - 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 的解决方案是什么?
解决方案
我正在努力记录这一点。您可能缺少 Ubuntu 的 MIP SDK 依赖项。您可以通过以下方式安装它们:
sudo apt-get install libgsf-1-dev libssl-dev libsecret-1-dev freeglut3-dev libcpprest-dev libcurl3-dev uuid-dev
推荐阅读
- javascript - 自定义 Babel 插件 - 将 stringLiteral 值更改为实际的 Javascript 代码
- javascript - scrollIntoView 没有滚动到请求带有提交按钮 onClick
- nginx - 在 Engintron 问题上反向代理到端口 8069,而它适用于标准 NGINX 设置
- node.js - 通过Nodejs中的查询字符串获取用户
- matlab - 如何在matlab向量上制作多个if?
- c# - 从 .NET Core 2.2 迁移到 3.1 时缺少 .Relational() 方法
- javascript - 如何将来自外部源的时间作为 X 轴添加到 ChartJS 图表?
- styled-components - Ract 样式组件慢
- swift - 带有 UIViewRepresentable 子类的链式方法
- font-awesome-5 - Font Awesome 4.7 到 5 坏了?