.net Core 在 CentOS7下,报The type initializer for 'Gdip' threw an exception.异常


运行含图片处理时发生异常:

The type initializer for 'Gdip' threw an exception.

解决办法如下

一、安装一下包:

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
git clone https://github.com/mono/libgdiplus
cd libgdiplus
./autogen.sh
make
make install

二、创建符号链接:

ln -s /usr/local/lib/libgdiplus.so /usr/lib64/libgdiplus.so
ln -s /usr/local/lib/libgdiplus.so /usr/libgdiplus.so

三、更新一下库:

updatedb

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM