• .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/

  • 相关阅读:
    [NoiPlus2016]换教室
    [HNOI2013]游走
    [Noi2002]Savage
    [SDOI2010]古代猪文
    [JSOI2008]最小生成树计数
    [SCOI2010] 连续攻击游戏
    文艺平衡树
    指针FHQTreap
    HAOI2007 上升序列
    HNOI2008 玩具装箱
  • 原文地址:https://www.cnblogs.com/icejd/p/14600938.html
Copyright © 2020-2023  润新知