网站首页> 文章专栏> Centos7安装libgdiplus
Centos7安装libgdiplus
日期:2020-08-24 22:50:30 作者:jzlnice 浏览量:4779

因为网站的验证码功能用到了System.Drawing.Common,需要在服务器中安装libgdiplus

命令如下

yum install autoconf automake libtool

yum install freetype-devel fontconfig libXft-devel

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

yum install glib2-devel cairo-devel

git clone https://github.com/mono/libgdiplus

cd libgdiplus

./autogen.sh

make

make install

cd /usr/lib64/

ln -s /usr/local/lib/libgdiplus.so gdiplus.dll

Git libgdiplus库时报错,提示“RPC failed; result=18, HTTP code = 200iB | 23.00 KiB/s


原因:默认git库太小 不够用 需要重新配置

解决方法:

输入命令:

git config --global http.postBuffer 24288000

查看

git config --list

参考链接:

https://www.cnblogs.com/calvinK/p/8119112.html

https://blog.csdn.net/cooken/article/details/50903169

安装完之后 运行网站还是报错。


      An unhandled exception has occurred while executing the request.

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 ---



在另一篇文章上看到,

在centos上安装libgdiplus-devel;

命令如下:yum install libgdiplus-devel 安装完成后即可解决上面问题

运行后确实解决了,不知道是不是只要安装libgdiplus-devel就可以了,下次有机会再验证

参考链接:https://www.cnblogs.com/qingfenglin/p/10504400.html

来说两句吧
最新评论
    热门文章
      随便看看