zoukankan      html  css  js  c++  java
  • .NET Core2.1项目在Linux上使用验证码报Unable to load shared library 'gdiplus' or one of its dependencies

    2019-05-09 10:27:01,330 线程ID:[80] 日志级别:ERROR 出错类:WebApp.HttpGlobalExceptionFilter property:[(null)] - 错误描述: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
       at System.DrawingCore.GDIPlus.GdiplusStartup(UInt64& token, GdiplusStartupInput& input, GdiplusStartupOutput& output)
       at System.DrawingCore.GDIPlus..cctor()
       --- End of inner exception stack trace ---
       at System.DrawingCore.GDIPlus.GdipGetGenericFontFamilySansSerif(IntPtr& fontFamily)
       at System.DrawingCore.FontFamily..ctor(GenericFontFamilies genericFamily)
       at System.DrawingCore.FontFamily.get_GenericSansSerif()
       at System.DrawingCore.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)
       at Common.VerifyCodeHelper.CreateByteByImgVerifyCode(String verifyCode, Int32 width, Int32 height) in F:srcWebAppCommonVerifyCodeHelper.cs:line 206
       at WebApp.Controllers.VerifyCodeController.NumberVerifyCode() in F:srcWebAppControllersVerifyCodeController.cs:line 27
       at lambda_method(Closure , Object , Object[] )
       at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
       at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
       at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync() 

    解决方法

    Centos 7

    yum install libgdiplus-devel

  • 相关阅读:
    JVM之内存区域
    记录Spring Boot小项目的一些坑
    JVM之编译OpenJDK
    Java容器之HashMap源码分析1
    IO流(1)--文件流及其原理
    IO流(0)
    Java中的字节和字符
    整理全网优秀的API接口设计及相关优秀的接口管理、在线文档生成工具
    关于智慧城市的建设方案和资料,相关内容大多来源于互联网,收集整理方便项目经理、产品经理、相关交通领域公司的使用
    整理可视化大屏设计教程与相关资源,大屏设计,可视化
  • 原文地址:https://www.cnblogs.com/asd14828/p/10837140.html
Copyright © 2011-2022 走看看