zoukankan      html  css  js  c++  java
  • .net core 部署在centos7,验证码不显示

    .net core 部署在centos7,验证码不显示,报如下错误:

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

    参照:https://github.com/dotnet/core/issues/2746

    sudo yum install libc6-dev 
    sudo yum install libgdiplus

     继续解决下一个问题

    正常验证码如下

     部署到centos 7,变形了,字体的位置好像不对路啊,什么鸟问题??

    字体用的是资源包里的,

    pfc.AddMemoryFont(ResourcesHelper.GetResFontPtr(Properties.Resources.elephant), Properties.Resources.elephant.Length);
    pfc.AddMemoryFont(ResourcesHelper.GetResFontPtr(Properties.Resources.georgia), Properties.Resources.georgia.Length);
    pfc.AddMemoryFont(ResourcesHelper.GetResFontPtr(Properties.Resources.Vineta), Properties.Resources.Vineta.Length);

    待解决...........

     临时解决方案,字体复制到

    /usr/share/fonts/micro/

  • 相关阅读:
    cv2.imwrite()指定图片存储路径问题
    fgets读取文件最后一行重复问题
    KEAZ128 时钟配置
    MinGW x64 for Windows安装
    [python] pygame安装与配置
    S32K144之时钟配置
    C/C++ scanf和gets 区别 , printf和puts区别
    堆排序
    约瑟夫问题
    Coursera 国内无法登陆问题
  • 原文地址:https://www.cnblogs.com/icejd/p/14600938.html
Copyright © 2011-2022 走看看