Skip to content

Unable to load DLL 'libgdiplus': The specified module could not be found. #2746

Description

@oguzhantopcu

I can not use GDI+ related things on Fedora 30.
I am getting an error while calling Image.FromStream(ms).

Error & stacktrace:

System.TypeInitializationException : The type initializer for 'Gdip' threw an exception.
---- System.DllNotFoundException : Unable to load DLL 'libgdiplus': The specified module could not be found.
   at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)
   at System.Drawing.Image.InitFromStream(Stream stream)
   at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)
   at Pompa.Invoicing.Xslt.ImageUtility.Resize(Byte[] image, Int32 width, Int32 height) in /home/j/Projects/pompa/src/Pompa.Invoicing/Xslt/ImageUtility.cs:line 15
   at Pompa.Invoicing.Xslt.XsltGenerator.GetEArchive(Byte[] signature, DiscountType discountType, Byte[] logo) in /home/j/Projects/pompa/src/Pompa.Invoicing/Xslt/XsltGenerator.cs:line 41
   at Pompa.Business.Tests.Gib.FakeInvoiceGeneratorBase.GenerateXslt(Boolean eb, DiscountType discountType) in /home/j/Projects/pompa/src/Pompa.Business.Tests/Gib/FakeInvoiceGeneratorBase.cs:line 137
   at Pompa.Business.Tests.Gib.FakeInvoiceGeneratorBase.GenerateArchiveUbl(DiscountType discountType) in /home/j/Projects/pompa/src/Pompa.Business.Tests/Gib/FakeInvoiceGeneratorBase.cs:line 116
   at Pompa.Business.Tests.Gib.GibProxyFacts`2.CreateArchiveInvoice(DiscountType discountType) in /home/j/Projects/pompa/src/Pompa.Business.Tests/Gib/GibProxyFacts.cs:line 47
   at Pompa.Business.Tests.Gib.GibProxyFacts`2.GetArchivePDF_Should_Get(DiscountType discountType) in /home/j/Projects/pompa/src/Pompa.Business.Tests/Gib/GibProxyFacts.cs:line 111
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
   at System.Runtime.InteropServices.FunctionWrapper`1.get_Delegate()
   at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
   at System.Drawing.SafeNativeMethods.Gdip..cctor()

My setup
Fedora 30
.Net Core 2.2.204
libgdiplus-devel 5.6-3.fc30
libgdiplus 5.6-3.fc30
Linux x 5.0.13-300.fc30.x86_64 #1 SMP Mon May 6 00:39:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions