4

Posting this here in case it helps someone else.

We use GemBox to build Excel reports and PDF's and we run our code on Linux.

We've been upgrading our projects to .NET 6 and have just run into this error.

Unable to load shared library 'libHarfBuzzSharp' or one of its dependencies...

I looked into GemBox's release notes and found they have made steps to move away from System.Drawing as Microsoft has dropped Linux support for this.

Gembox Announcement

Bug Maker
  • 434
  • 7
  • 20

2 Answers2

8

Interestingly, having GemBox Nuget up-to-date did not install these dependencies, so we installed HarfBuzzSharp 2.8.x.x and ran our code. We still got the same issue. We then had to install HarfBuzzSharp.NativeAssets.Linux 2.8.x.x.

Once we manually updated these dependencies, our code worked again.

Hope this helps someone else.

P.s. this is also likely the case for SkiaSharp

Bug Maker
  • 434
  • 7
  • 20
  • 2
    Yes, both `HarfBuzzSharp.NativeAssets.Linux` and `SkiaSharp.NativeAssets.Linux` are required on Linux. Please check the [Linux / macOS](https://www.gemboxsoftware.com/spreadsheet/examples/create-excel-pdf-on-linux-net-core/5701) and [Docker](https://www.gemboxsoftware.com/spreadsheet/examples/create-excel-pdf-on-docker-net-core/5902) examples. – Mario Z Sep 06 '22 at 10:49
0

Useful information. both HarfBuzzSharp.NativeAssets.Linux and SkiaSharp.NativeAssets.Linux should be installed by nuget.

System.DllNotFoundException: Unable to load shared library 'libHarfBuzzSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibHarfBuzzSharp: cannot open shared object file: No such file or directory