.net core 2.2发布后支持System.Drawing.Common绘图,可以做一些图片验证码之类的功能,应用程序在Windows上运行功能正常,但是部署到centos上就会报错:

System.TypeInitializationException: The type initializer for 'System.DrawingCore.GDIPlus' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'gdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgdiplus: cannot open shared object file: No such file or directory

解决办法:

centos上安装libgdiplus-devel;

命令如下:yum install libgdiplus-devel 

安装完成后重启 .net core 服务  OK!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2022-02-25
  • 2021-11-26
  • 2022-12-23
猜你喜欢
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-02-20
相关资源
相似解决方案