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/

  • 相关阅读:
    idea主题更换pycharm/intellij
    随机生成n张扑克牌。
    JAVA生成6个1-8的随机数,要求无重复。
    一道简单 的循环
    linux虚拟机互访
    linux中grep命令
    vi和vim编辑器
    文件压缩打包以及备份
    文件内容查询
    目录相关操作
  • 原文地址:https://www.cnblogs.com/icejd/p/14600938.html
Copyright © 2011-2022 走看看