I can confirm it is something about how the library was compiled. I downloaded the FreeImage source, built on my machine, replaced libfreeimage-3.17.0.so, and now its working.
Just throwing my $0.02 in here, I’ve also had this exact same issue and solved it as well by compiling libfreeimage-3.17.0.so manually and replacing it.
Linux Mint 17.3 64-Bit with Mono JIT compiler version 4.6.1 and MonoGame 3.5, downloaded from the website last week.
I have this same problem in Ubuntu 16.04 and tried the same fix but it didn’t work.
It might be worth noting that my error says “System.DllNotFoundException: FreeImage”
I’m not sure if this is a difference in how libraries are loaded in the different Ubuntu versions, or if this is a sign that the error is actually slightly different.
EDIT: I think I made the stupid mistake of trying to use my WindowsGL build on linux. That would explain why it’s referencing the dll name, FreeImage, rather than the the lib name. I decided to just stick with a single dev environment (Windows) so I don’t need to maintain multiple sets of framework and pipeline packages. I can just copy the DesktopGL build from Windows over to Linux whenever I want to test on Linux.
I realize this post is old, but would you mind describing how you replaced libfreeimage-3.17.0.so in your build environment? After installing libfreeimage this way I get a bunch of ambiguous call exceptions when building with dotnet cli.
This, times ~2500:
FreeImage/Wrapper/FreeImage.NET/cs/Library/FreeImageStaticImports.cs(1948,14): error CS0229: Ambiguity between ‘FreeImage.FreeImageLibrary’ and ‘FreeImage.FreeImageLibrary’
Haha, I can’t even remember what I had for lunch yesterday, let alone something that happened 2 years ago
But maybe I can still be useful… If your linux distro is like mine, it installs libfreeimage in the directory:
/usr/lib/x86_64-linux-gnu
Looking at Makefile.gnu in the libfreeimage source zip, it installs to:
/usr/lib
My guess would be you’ve got the library at both locations? If so, I’d blast the one installed by the distro. Something like this (depending on if you installed the dev and dbg libraries)