.net core linux环境下导出到excel报The type initializer for ‘Gdip‘ threw an exception.异常

.net core linux环境下导出到excel报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 GitHub - mono/libgdiplus: C-based implementation of the GDI+ API
cd libgdiplus
./autogen.sh(无权限时执行 chmod 777 ./autogen.sh)
make(出现make: *** No targets specified and no makefile found.  Stop时执行:yum install gcc、yum install gcc gcc-c++ gcc-g77)
make install

二、创建符号链接:

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

三、更新一下库:

updatedb

猜你喜欢

转载自blog.csdn.net/nocoah/article/details/122238938