Skip to content

Unable to run the example in Ubuntu 20.04 - LoadLibrary failed for libmip_dotnet.so #2

Description

I always get this error when trying to run ./mipsdk under Ubuntu 20.04.

Unhandled exception. System.ComponentModel.Win32Exception (0x80004005): LoadLibrary failed for: [/home/<sanitized>/mip-filesdk-dotnet-core/bin/Debug/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 Microsoft.InformationProtection.MIP.CreateMipContext(MipConfiguration mipConfiguration)
   at mipsdk.Action..ctor(ApplicationInfo appInfo) in /home/<sanitized>/mip-filesdk-dotnet-core/src/Action.cs:line 86
   at mipsdk.Program.Main(String[] args) in /home/<sanitized>/mip-filesdk-dotnet-core/src/Program.cs:line 35
Aborted

The error persists if migrating to .NET 6 and happens in general with every .NET application trying to use Microsoft.InformationProtection.File under Ubuntu 20.04.

Minimal steps to reproduce

sudo apt-get install scons libgsf-1-dev libssl-dev libsecret-1-dev freeglut3-dev libcpprest-dev libcurl3-dev uuid-dev
git clone https://github.com/Azure-Samples/mip-filesdk-dotnet-core.git
# change the PackageReference to Microsoft.InformationProtection.File.Ubuntu2004 in mipsdk.csproj
dotnet build --output ../bin/Debug   [from src]
cd ../bin/Debug
./mipsdk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions