Unable to load shared library 'libSkiaSharp' or one of its dependencies - azure app service on Linux
See original GitHub issueDescription
Just like the bug that was closed #1312 . Except this one is not using any other external libs, it’s just the Skia code.
A page that accesses Skia on Azure Linux fails. The same page on Windows desktop or Azure runs fine.
Exception
DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
SkiaSharp.SkiaApi.sk_managedstream_set_procs(SKManagedStreamDelegates procs)
TypeInitializationException: The type initializer for 'SkiaSharp.SKAbstractManagedStream' threw an exception.
SkiaSharp.SKAbstractManagedStream..ctor(bool owns)
Raw
System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibSkiaSharp: cannot open shared object file: No such file or directory
at SkiaSharp.SkiaApi.sk_managedstream_set_procs(SKManagedStreamDelegates procs)
at SkiaSharp.SKAbstractManagedStream..cctor()
<PackageReference Include="Azure.Cosmos" Version="4.0.0-preview3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.5" />
<PackageReference Include="Microsoft.Azure.Cosmos.Table" Version="2.0.0-preview" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.1.3" />
<PackageReference Include="Azure.ImageOptimizer" Version="1.1.0.39" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.5.0-preview.1" />
<PackageReference Include="SkiaSharp" Version="2.80.0-preview.14" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.0-preview.14" />
- Version with issue: Both 1.6 and 2.8 preview (NUGET)
- IDE: VS2019
- Core 3.1, Azure Linux App Service
Issue Analytics
- State:
- Created 3 years ago
- Comments:45 (16 by maintainers)
Top Results From Across the Web
Unable to load shared library 'libSkiaSharp' or one of its ...
I had a pretty similar issue. In my case the issue was the same message: dotnet can not find the libraries. The nuget...
Read more >Unable to load shared library 'libSkiaSharp' or one of its ...
I try run app on dotnet 2.1 (ubuntu), but its show errors. How solve it? 21.3.0.
Read more >Unable to load shared library 'libSkiaSharp' or one of its ...
I have encountered an exception when reading to GetDocumentInfo().PageCount. Im using the GroupDocs.Parser version 21.5.0 from nuget and running on a linux ......
Read more >Karim
Unable to load shared library 'libSkiaSharp' or one of its dependencies - azure app service on... Description Just like the bug that was ......
Read more >System.DllNotFoundException - Microsoft Q&A
The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. Unable to load shared library 'libSkiaSharp' or one of its dependencies ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This also solved my issue, allowing Maui.Graphics tests to run on Linux in GitHub Actions 👍 🚀
Previously my error was:
Thanks for the hint @marciosarabando, installing the package “HarfBuzzSharp.NativeAssets.Linux” solved it for me as well (.NET 6 running on Raspberry Pi Linux).