Failed to Use Aspose.Slides for .NET 23.9 on Linux CentOS 7

I face the same issue but don’t know how to fix this, is there a whole solution to share?
my env is linux centos 7 + net6 + aspose slides 23.9.0, alrealy do just follow this subject: Aspose.Slides for .NET 6 Cross Platform|Aspose.Slides Documentation
by the way, i could not use apt to install any library due to security issue.

  1. still show error message: Unable to load shared library ‘libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23’ or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23: cannot open shared object file: No such file or directory

  2. show GLIBCXX_3.4.22 not found when using ldd
    [root@guest# ldd myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so
    ldd: warning: you do not have execution permission for myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so' myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: /lib64/libstdc++.so.6: version GLIBCXX_3.4.20’ not found (required by myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so)
    myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so) myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: /lib64/libstdc++.so.6: version GLIBCXX_3.4.22’ not found (required by myprojectdir/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so)

@davidxiao2008,
While CentOS 7 GLIBC version is 2.14, Aspose.Slides for .NET 6 and .NET 7 requires Linux x86_x64 with GLIBC 2.23 and higher.

please give a solution to add Linux x86_x64 with GLIBC 2.23 and higher.
and is GLIBC dll is all i should update, is there any other library should add?

@davidxiao2008,
I think you should update the OS to CentOS 8. It contains glibc 2.28.

it’s not friendly for new guest from 23.6 to 23.9 under linux, and we could not update to CentOS8.
can downgrading to older versions of DLLs, such as 23.3 in order to solve this problem?
is there any subject to teach how to do if exists?

@davidxiao2008,
I am working on your question and will get back to you as soon as possible.

@davidxiao2008,
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44270

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

is there any replacement solution can used under centos?

@davidxiao2008,
Unfortunately, .NET 6 cross-platform version of Aspose.Slides cannot be used on CentOS 7. It is possible to use Aspose.Slides for .NET Standard (the NuGet package contains Aspose.Slides for .NET Standard 2.0 and 2.1). Would you consider this option?

I will temporary downgrade from net6 to net standard2 but it’s not a long-term solution :sob:
Could you share the road map for cross-platform version of Aspose.Slides on CentOS 7?
Thanks.

By the way, Is this article outdated?

@davidxiao2008,
We have plans to support CentOS 7.

We have linked the following ticket(s) from our internal issue tracking system to this forum thread and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNET-44166

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

I’ve requested an ETA for the issue from our development team and will inform you as soon as possible.

No, the article is relevant at the moment.

@andrey.potapov Face new problem after downgrade from netcore 6 to netcore 2.1 under CentOS7 with Aspose.Slides.NET 23.10.0 and Aspose.Cells 23.10.0( they are the same error).
by the way, could not use apt to install any library in production server.

Trace as following:

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.Runtime.InteropServices.FunctionWrapper1.get_Delegate() 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.GdipStringFormatGetGenericTypographic(IntPtr& format) at System.Drawing.StringFormat.get_GenericTypographic() at ..ctor(Bitmap ) at ..ctor(Int32 , Int32, Single , Single , Single , SVGOptions , ) at .(Presentation , Int32[], String[] , String[] , Int32[] , [] , List1 , String , , , ILinkEmbedController , String , , SVGOptions , HtmlOptions )
at .(Presentation , Stream, Int32[] , HtmlOptions , InterruptionToken )
at Aspose.Slides.Presentation.Save(Stream stream, SaveFormat format, ISaveOptions options)

@davidxiao2008,
I am guessing you tried using Aspose.Slides for .NET Standard 2.1. Could you please share a sample project that reproduces the error?

here is sample code:

byte[] fileStreamBytes = File.ReadAllBytes({here is ppt file path});
using (MemoryStream stream = new MemoryStream(fileStreamBytes))
{
	using (Presentation document = new Presentation(stream))
	{
		using (var ms = new MemoryStream())
		{
			HtmlOptions htmlOptions = new HtmlOptions();
			document.Save(ms, Aspose.Slides.Export.SaveFormat.Html, htmlOptions);
			string contentType = "text/html";

			return File(ms.ToArray(), contentType);
		}
	}
}

@davidxiao2008,
Thank you for the sample code. I will check the error and get back to you a bit later.

ETA for a fix is not earlier than 2024’Q2.

@davidxiao2008,
Unfortunately, I was unable to reproduce the error you described. Please share a sample project and presentation file.