.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

 

posted @ 2020-09-11 15:46  yswenli  阅读(6713)  评论(7编辑  收藏  举报