Unable to Load Shared Library ‘libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23’

We are also having problem running Aspose 23.2 or 23.3 (eg, a version after .NET 6 support was added).

With 23.1 and earlier we’ve used the following docker file to run our aspose.slides application (not relevant parts of the file missing in the example below):

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS runtime
RUN apt-get update -y && apt-get install -y apt-utils
RUN apt-get install -y libgdiplus && apt-get install -y libc6-dev

… other docker related things here not relevant to the issue

When using 23.2 or 23.3 we get the following run time error:

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 using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.4/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: cannot open shared object file: No such file or directory
/app/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.4/liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: cannot open shared object file: No such file or directory
/app/liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.4/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23: cannot open shared object file: No such file or directory
/app/libaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/7.0.4/liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23: cannot open shared object file: No such file or directory
/app/liblibaspose.slides.drawing.capi_x86_64_libstdcpp_libc2.23: cannot open shared object file: No such file or directory

@hostmasternepa,
Thank you for reporting on the issue.

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-43886

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.

@hostmasternepa,
We’ve updated the latest NuGet version of Aspose.Slides for .NET with a hotfix: NuGet Gallery | Aspose.Slides.NET 23.3.1
Please try using it. We will be waiting for your feedback.

23.3.1 solved this issue for us, thanks for quick fix!

@hostmasternepa,
Thank you for your feedback.

HI @andrey.potapov
Using version 23.4, for some ppt files, this problem still seems to exist (.net 6.0 platform), in Linux environment (windows has no problem).

System.DllNotFoundException: 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
   at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError)
   at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
   at System.Runtime.InteropServices.NativeLibrary.Load(String libraryName, Assembly assembly, Nullable`1 searchPath)
   at .(String , Assembly , Nullable`1 )
   at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags)
   at .e(IntPtr& a)
   at System.Drawing.FontFamily.()
   at System.Drawing.FontFamily.get_GenericSerif()
   at .()
   at .(FontStyle )
   at.(String , FontStyle , String )
   at .( , Boolean )
   at .( , Boolean , Single , , Int32 , Boolean )
   at .(String , FontStyle ,  , Boolean, Single ,  , Int32 , Boolean )
   at .( , String ,  , Int32, Single , FontStyle , Boolean )
   at .(String ,  , Int32 , Single, FontStyle , Boolean )
   at .(String ,  , Int32 , Single, FontStyle , Boolean )
   at 
t .(& , Boolean& )
   at 
t tor(TextFrame ,  , IBaseSlide  )
   at .( ,  )
   at .( )
   at .(Boolean )
   at .()
   at Aspose.Slides.Shape.get_Frame()
   at 
t 
t .(
t.(
t 
t 
tnterruptionToken )
   at Aspose.Slides.Presentation. )
   at Aspose.Slides.Presentation.(Stream , Boolean )
   at Aspose.Slides.Presentation..ctor(Stream stream, LoadOptions loadOptions)

Test.zip (88.7 KB) this is a test file

@Kyrie,
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-44004

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.

@Kyrie,
Our developers have investigated the case and found that the Docker image is missing some libraries (libfontconfig.so.1, libfreetype.so.6, libexpat.so.1, and libpng16.so.16) that are used by Aspose.Slides. These libraries can be installed with the following packages: libfontconfig1, libfreetype6, libexpat1, libpng16-16.
Here is an example command for the Dockerfile:

#Install the necessary libraries for Aspose.Slides under .NET 6.0 and .NET 7.0, which may be missing in the Docker image
RUN apt-get update && apt-get install -y \
 libfontconfig1 \
 libfreetype6 \
 libexpat1 \
 libpng16-16

Please add these commands to the Dockerfile to ensure that the necessary libraries are installed.

Did this solution work?

@rakesnayak2007,
If you encounter an issue with Aspose.Slides, please create a new forum topic and describe the problem.