We just upgraded to newest version of Aspose.Word (25.3.0) and we have a linux environment so we are using
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.9" />
and we are now getting the error
It seems that you are encountering an issue related to the SkiaSharp library after upgrading to Aspose.Words version 25.3.0 in a Linux environment. This type of problem often arises due to missing dependencies when running .NET applications on Linux, particularly with SkiaSharp.
To resolve this issue, you can try the following steps:
-
Check for Missing Dependencies: Use the command
ldd libSkiaSharp.so
to identify any missing dependencies. If you see an error indicating thatld-linux-x86-64.so.2
is missing, this is likely the cause of your issue. -
Install Required Packages: If you are using Alpine Linux, you can resolve the missing dependency by adding the
gcompat
package to your Dockerfile. This can be done by including the following line in your Dockerfile:RUN apk add --no-cache gcompat
-
Dockerfile Example: Here’s a simplified example of how your Dockerfile might look:
FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine3.15 AS base WORKDIR /app RUN apk add --no-cache gcompat # Other necessary packages can be added here as needed FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY ["YourProject.csproj", "."] RUN dotnet restore "./YourProject.csproj" COPY . . RUN dotnet build "YourProject.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "YourProject.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "YourProject.dll"]
By following these steps, you should be able to resolve the SkiaSharp library loading issue in your Linux environment. If you continue to experience problems, please provide additional details about the error message you are receiving, and I would be happy to assist further.
@dmerkle1 Starting from 25.2 version of Aspose.Words, 3.116.1 version of SkiaSharp is required. So please update SkiaSharp.NativeAssets.Linux
to 3.116.1 version.
Okay thanks for the response. That seems to do the trick