The type initializer for 'Gdip' threw an exception when exporting to excel in .net core linux environment.
1. Install the package:
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
2. Create a symbolic link:
ln -s /usr/local/lib/libgdiplus.so /usr/lib64/libgdiplus.so
ln -s /usr/local/lib/libgdiplus.so /usr/libgdiplus.so
3. Update the library:
updatedb