Linux 环境下安装 Npoi 的依赖项 GDI+

Npoi 使用了 System.Drawing.Common, 所以我们得在linux下面安装 libgdiplus 和 libc6

Ubuntu 16.04+

apt-get install libgdiplus libc6-dev
cd /usr/lib
ln -s libgdiplus.so gdiplus.dll

Fedora 23+

dnf install libgdiplus
cd /usr/lib64/
ln -s libgdiplus.so.0 gdiplus.dll

CentOS 7+

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

Docker image - Alpine

base sdk-alpine/aspnetcore-runtime-alpine images

RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
RUN apk --update add libgdiplus

Docker image - Debian

FROM microsoft/dotnet:2.1-aspnetcore-runtime
RUN apt-get update && apt-get install -y libgdiplus libc6-dev && ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll
最近更新的
...