-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
How to use NPOI on Linux
Tony Qu edited this page Jan 29, 2023
·
9 revisions
Since NPOI 2.6.0, System.Drawing.Common is not used anymore. You don't need to setup anything on Linux.
Thank you for the contribution from rob
Since NPOI uses System.Drawing.Common, you must install libgdiplus and libc6 on Linux system.
apt-get install libgdiplus libc6-dev
cd /usr/lib
ln -s libgdiplus.so gdiplus.dll
dnf install libgdiplus
cd /usr/lib64/
ln -s libgdiplus.so.0 gdiplus.dll
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
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
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