Azure-Samples / Azure-Samples/MipSDK-File-Dotnet
Unable to run the example in Ubuntu 20.04 - LoadLibrary failed for libmip_dotnet.so
- Dominant language
- C#
- Stars
- 7
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
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//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//mip-filesdk-dotnet-core/src/Action.cs:line 86
at mipsdk.Program.Main(String[] args) in /home//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
```sh
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
```
Contributor guide
Assessment
This issue has not been assessed yet.