-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to load DLL 'libgdiplus': The specified module could not be found. #2746
Comments
You can try sudo apt install libc6-dev
sudo apt install libgdiplus |
Looks answered. Feel free to reopen if you need more help. cc @safern |
Thanks @igoventura for your help on multiple issues here! It's appreciated! |
Thanks for replying @igoventura |
libgdiplus is already installed on my computer. I have already shared my version numbers. I have just tried compiling/installing libgdiplus from the source code. it did not worked. I still get the same error. I think I have no right to re-open the issue. so it is up to you. |
did you install libc6-dev as well? It is required by libgdiplus Also could you please try setting: Also you can use |
Hello, I am using Fedora 30 and .net core 2.1 and I have exactly the same issue. I can see you suggest to install libc6-dev, but it's not available for Fedora. What I have installed is: |
I have installed all libraries you have suggested. I also downloaded libgdiplus source then compiled/installed myself. did not work. I set env variable as you specified. Same error. I have tried to use LD_DEBUG, I could not investigate anything since it is giving an output like a matrix (movie) window. Alsı I have failed to redirect LD_DEBUG output to a file ">" or | tee is not working. |
Is it possible to re-open this issue since it is not resolved actually? @karelz |
@oguzhantopcu could you please run Try linking Also, it would be great if you could share EDIT: i.e: |
what I have tried:
The last one gives HUGE output, I can not examine it nor copy from the console. I can not redirect the output to the text file neither. ">" or | tee is not doing the trick. |
can you do the last one and grep for
|
Also, do you have: Btw, I'd like to mention that we just found out that libgdiplus is not working on I've started a thread with them and also have tracking issue: mono/libgdiplus#546 |
@safern BTW I am using fedora 30 :). |
Ok, so I got a local repro, used LD_DEBUG=libs and then found the error. The loader is hitting a fatal error when trying to load /lib64/libgdiplus.so.0: error: symbol lookup error: undefined symbol: GifQuantizeBuffer (fatal)
|
Installed libc6-dev & libgdiplus but still error. Ubuntu 16.03. Please re open this issue. |
You can fix the problem by installing System.Drawing.Common 4.6.0-preview. |
Use |
i meet the same error, after i updata System.Drawing.Common to 4.6.0-preview it`s okay~~ |
I have same error. It is not working with "4.5.1", it is not working with "4.6.0-preview8.19405.3". But working with "4.6.0-preview7.19362.9". |
.net core 3 preview8 has different issue such as non displaying text which drawing on bitmap. it shows empty square |
Still an error in Ubuntu 19.04 using .net core 3 rc1, I have tried everything that is said in this issue. |
could you please share what version of the S.D.Common package and what target framework did you use? |
I see, that is the problem. We fixed the way we're hooking up the native loading of the dependencies to make it better, so you would need to use a System.Drawing.Common that is >= 4.6.0, would you mind trying to add a |
@safern Thank you! You saved my day, I had tried that before but with the preview6 version of the package and it didnt work, now it does with the rc1!. |
I am on my macOS Mojave and that seemed to be doing the trick for me |
I had same problem in gitlab pipeline, so I added
and it helped |
this solved my issue on .NET Core 3.1
|
Can confirm that this fixes the issue on Mojave. |
How can I fix this issue on .NET Core 3.1 hosted on Linux Azure App Service? |
Any update on this ? |
Hello, I am facing the exact same issue as well. We are on .NET Core 3.1, have the latest System.Drawing.Common 4.7.0 installed but when we try to deploy this to Linux Azure App Service, we face the exact same issue. None of the above mentioned solutions seem to be working. I am chatting with Azure Support and they are looking into a solution. Any help would be very much appreciated. |
Like @msx752 stated, |
back in dotnetcore 2.2, I had to use this process to add all of the necessary libraries to my container so that it would work with system.drawing. This may have to be updated for 3.1. I'm actually working on this today for 3.1 so ill provide any updated instructions as I find them:
|
Just add |
This did not work for me. Anyone else have other solutions? |
@Andotnet thanks, it worked for me. I had Referencing |
@amirvenus that solve the problem, thanks |
On macOS Catalina, VSCode 1.44.2 nuget -> "runtime.osx.10.10-x64.CoreCompat.System.Drawing" fixed the problem |
This, too, solved by problem on an Azure App Service running on Linux, thank you @eduardoluizm Two questions, tough:
And perhaps the biggest question of all: is this a .NET Core bug? Or perhaps a problem with the Docker image, that should have these packages installed? I see a huge variety of platform-specific solutions on this thread, but are we really supposed to need these workarounds in the first place? |
Had the same problem on my mac in visual studio 2019. Installed mono-libgdiplus with brew but this wasn't enough. Read many articles, but some how no one mention that you with visual studio for mac also need to install the "runtime.osx.10.10-x64.CoreCompat.System.Drawing" by the build in nuget manager. After this it's working. Hopefully this will help others save some time. |
pmamcdk - Thanks and your post really saved my day. |
I can confirm this works also if using Bitbucket pipelines. Just add as a first step in your script: script:
- apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev
- dotnet restore |
It works! |
It worked for me on macOS Catalina 10.15.4 as well. |
Here's my two cents: this used to be a problem for me on Azure App Services running on Linux. I solved it adding the "apt-get ... && apt-install ..." line as suggested on previous posts. However, sometime around Oct/Nov of 2020, this stopped being an issue. I no longer need to add anything on the Startup command, it just works. Perhaps there was some kind of change on the underlying Azure infrastructure... It remains a mistery to me why this was an issue in the first place for so many people. |
The comment by @pmamcdk above fixed my problem on Mac. Need to install the "runtime.osx.10.10-x64.CoreCompat.System.Drawing" by the build in nuget manager. |
I can not use GDI+ related things on Fedora 30.
I am getting an error while calling
Image.FromStream(ms)
.Error & stacktrace:
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
The text was updated successfully, but these errors were encountered: