珂珂的个人博客 - 一个程序猿的个人网站

升级.net8 后SkiaSharp问题

网站升级了.net8  发现验证码图片无法打开,起初以为是runtimes 文件夹没有复制linux-x64  但复制进去还是报错,关于这个文件夹可以在csproj 项目文件中加入<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.7" /> 获得。

于是再仔细查看错误

 If you're using glibc, consider setting the LD_DEBUG environment variable: 

      /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.2/libSkiaSharp.so: cannot open shared object file: No such file or directory

      /root/web/passport.kecq.com/libSkiaSharp.so: cannot open shared object file: No such file or directory

      /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.2/liblibSkiaSharp.so: cannot open shared object file: No such file or directory

      /root/web/passport.kecq.com/liblibSkiaSharp.so: cannot open shared object file: No such file or directory

      /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.2/libSkiaSharp: cannot open shared object file: No such file or directory

      /root/web/passport.kecq.com/libSkiaSharp: cannot open shared object file: No such file or directory

      /usr/lib64/dotnet/shared/Microsoft.NETCore.App/8.0.2/liblibSkiaSharp: cannot open shared object file: No such file or directory

      /root/web/passport.kecq.com/liblibSkiaSharp: cannot open shared object file: No such file or directory

看来需要将 libSkiaSharp.so 复制到网站根目录,但是我看.net6 并不需要的。

解决



上一篇:个人代码全部开源

下一篇:AMD 5800H 小主机折腾记


0 评论

查看所有评论

给个评论吧