本文告诉大家如何简单修复在 Linux 上使用 SkiaSharp 提示找不到 libSkiaSharp 库
我的应用在 Windows 上跑的好好的,放在 Linux 上一运行就炸掉了,异常内容如下
Unhandled exception. System.TypeInitializationException: The type initializer for 'SkiaSharp.SKColorSpace' threw an exception.
---> 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_colorspace_new_srgb()
at SkiaSharp.SKColorSpace..cctor()
--- End of inner exception stack trace ---
at SkiaSharp.SKColorSpace.CreateSrgb()
at Program.<Main>$(String[] args) in d:\lindexi\Code\SkiaSharp\SkiaSharp\KebeninegeeWaljelluhi\KebeninegeeWaljelluhi\Program.cs:line 5