microsoft-information-protection

Microsoft.InformationProtection.File.Ubuntu1804 - Load library failed for libmip_dotnet.so


I want to use the Microsoft.InformationProtection.File.Ubuntu1804 in a netcore3.1 console app. I published my app with the command:

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

When I run it in docker image (mcr.microsoft.com/dotnet/core/aspnet:3.1-bionic) but i get the following error:

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)

In other post, the solution for windows application is to install VC++ redistributable... But what is the solution for Ubuntu ?


Solution

  • I'm working on getting this documented. You're likely missing the MIP SDK dependencies for Ubuntu. You can install those by:

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