Error [System.DllNotFoundException: Unable to load shared library 'gdi32.dll' or one of its dependencies]?

208 Views Asked by At

I build a Application NetCore 3.1 ,it using System.Drawing.Common.dll and run on ubuntu

System.DllNotFoundException: Unable to load shared library 'gdi32.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgdi32.dll: cannot open shared object file: No such file or directory

I have tried the below in docker file, but no luck. still getting the same error.

#install libgdiplus for System.Drawing RUN apt-get update
&& apt-get install -y --no-install-recommends libgdiplus libc6-dev libx11-dev libc6 RUN apt-get update
&& apt-get install -y apt-utils libgdiplus libc6-de

1

There are 1 best solutions below

1
On

GDI is a Windows-native library. Supposedly there's a Linux version. Your mileage may vary.