• CentOS7下.Net 5.0 6.0服务调用System.Drawing.Graph生成验证码图片,异常报错处理


    1.yum install libgdiplus --应该是先更新yum

    2.如果报错安装
    yum install epel-release

    后再

    yum install libgdiplus

    3.libgdiplus的几个依赖

    yum -y install autoconf automake libtool

    yum -y install freetype-devel fontconfig libXft-devel

    yum -y install libjpeg-turbo-devel libpng-devel giflib-devel libtiff-devel libexif-devel

    yum -y install glib2-devel cairo-devel

    yum -y install mlocate

    ln -s /usr/lib64/libgdiplus.so /usr/lib64/gdiplus.dll

    或者

    cd /usr/lib && ln -s libgdiplus.so gdiplus.dll

    4.如果还有错误

    yum install libgdiplus-devel  

    5.如果还有错误

    vim dx.h5.api.runtimeconfig.json

    [appmanager@localhost api]$ cat dx.h5.api.runtimeconfig.json
    {
      "runtimeOptions": {
        "tfm": "net6.0",
        "frameworks": [
          {
            "name": "Microsoft.NETCore.App",
            "version": "6.0.0"
          },
          {
            "name": "Microsoft.AspNetCore.App",
            "version": "6.0.0"
          }
        ],
        
        "configProperties": {
          "System.GC.Server": true,
          "System.Drawing.EnableUnixSupport": true,
          "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
        }
      }
    }
    

      

  • 相关阅读:
    与您分享
    与您分享
    与您分享
    与您分享
    与您分享
    分享:PythonSIP 4.14.2 发布
    与您分享
    编码
    分享:C++十种方法"Hello World"
    与您分享
  • 原文地址:https://www.cnblogs.com/rengke2002/p/16268713.html
Copyright © 2020-2023  润新知