You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to run a .NET 5 application that exports to an Excel spreadsheet. When I reach the export part, I get the following error:
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
After running it with LD_DEBUG, I noticed that the glibc version is incorrect.
/snap/core18/current/lib/x86_64-linux-gnu/libm.so.6: error: version lookup error: version `GLIBC_2.29' not found (required by /lib/libgdiplus.so) (fatal)
The version of glibc that ships with Ubuntu is 2.31.
libgdiplus is version 6.0.4
I don't know if this is an issue with Ubuntu, libgdiplus packaging, or what.
Configuration
Which version of .NET is the code running on?
.NET 5
What OS and version, and for Linux, what distro?
Ubuntu 20.04
What is the architecture (x64, x86, ARM, ARM64)?
x64
Other information
Please include any relevant stack traces or error messages. If possible please include text as text rather than images (so it shows up in searches).
2021-06-22 21:25:27.193 -04:00 [ERR] The type initializer for 'Gdip' threw an exception.
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)
at System.Drawing.FontFamily.GetGdipGenericSansSerif()
at System.Drawing.FontFamily.get_GenericSansSerif()
at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at OfficeOpenXml.ExcelRangeBase.AutoFitColumns(Double MinimumWidth, Double MaximumWidth)
The text was updated successfully, but these errors were encountered:
Hi, I am fighting the same issue right now. Did you make any progress?
I also noticed that in the exception it says liblibgdiplus in the end of the line:
System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
Not sure if that has anything to do with it, but it seems odd.
It sure does seem odd, and yes I noticed it too.
I activated LD_DEBUG and saw that it was expecting the wrong glibc version.
29.1 instead of 32.x? (I'm on mobile right now)
My workaround was to use a Docker container
On Wed., Jul. 14, 2021, 06:19 hschwane, ***@***.***> wrote:
Hi, I am fighting the same issue right now. Did you make any progress?
I also noticed that in the exception it says liblibgdiplus in the end of
the line:
System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
Not sure if that has anything to do with it, but it seems odd.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#711 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAF4KJPP2C6GUSDME7XKDJLTXVQEBANCNFSM47E2ZB2Q>
.
Description
I'm attempting to run a .NET 5 application that exports to an Excel spreadsheet. When I reach the export part, I get the following error:
After running it with LD_DEBUG, I noticed that the glibc version is incorrect.
The version of glibc that ships with Ubuntu is 2.31.
libgdiplus is version 6.0.4
I don't know if this is an issue with Ubuntu, libgdiplus packaging, or what.
Configuration
.NET 5
Ubuntu 20.04
x64
Other information
The text was updated successfully, but these errors were encountered: