0

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

Shiva
  • 1

1 Answers1

0

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

Xavier J
  • 4,326
  • 1
  • 14
  • 25
  • we are using the DLLImport in our code, should we change the DLLimport code to System.Drawing.Graphics ?. example of DLLImport are -> [DllImport("usp10.dll")] and [DllImport("gdi32.dll") – Shiva Sep 22 '22 at 08:31