# How to fix IronPDF DllNotFoundException: unable to load 'IronPdf.Native.Linux'

Source: https://pdfluent.com/errors/ironpdf-dll-not-found/

IronPDF requires a native binary per platform. When missing or mismatched,.NET throws DllNotFoundException.

DllNotFoundException

`Unable to load DLL 'IronPdf.Native.Linux'`

## Why this happens

### Missing native DLL in deployment artifact

IronPDF's NuGet package includes platform-specific native binaries. If your publish step excludes native assets (e.g. using --no-self-contained without the right runtime identifier), the IronPdf.Native.Linux.so file is absent at runtime and.NET cannot load it.

### Wrong CPU architecture

IronPDF ships separate binaries for x64 and ARM64. Deploying an x64 build to an ARM-based server (e.g. AWS Graviton, Apple Silicon Docker host) or vice versa causes the DllNotFoundException because the binary exists but is for the wrong architecture.

### Missing libgdiplus or other system dependencies on Linux

IronPDF's Linux native layer depends on libgdiplus, libfontconfig, and other system libraries that are not present in minimal base images like alpine or debian-slim. Without these, the native library itself fails to load even if the file is present.

## How to fix it

1. Install required system dependencies on LinuxBefore running your application, install the native dependencies that IronPDF's Linux binary requires. Add these to your Dockerfile or server provisioning script. code `*# Debian/Ubuntu base image**RUN apt-get update && apt-get install -y \**libgdiplus \**libfontconfig1 \**libc6 \**libssl3 \**&& rm -rf /var/lib/apt/lists/**`
2. Publish with the correct runtime identifierEnsure your dotnet publish command targets the correct runtime. If you are deploying to Linux x64, use linux-x64. For ARM64 use linux-arm64. This ensures the matching native binary is included in the output. code `*# Publish targeting Linux x64 explicitly**dotnet publish -c Release -r linux-x64 --self-contained true**# Or for ARM64 (AWS Graviton, Apple Silicon):**dotnet publish -c Release -r linux-arm64 --self-contained true*`
3. Migrate to PDFluent — no native DLLs requiredPDFluent is a library written in Rust distributed as a single static binary. There are no platform-specific DLLs, no libgdiplus dependency, and no architecture mismatches. It runs on Linux, macOS, and Windows x64/ARM64 from a single build. code `*use pdfluent::PdfDocument;**// No DLL loading, no native dependencies to install**let doc = PdfDocument::open("input.pdf")?;**let text = doc.page(1)?.text()?;**println!("{}", text);*`

## Frequently asked questions

Does IronPDF work on Linux?

Yes, but it requires installing native system libraries (libgdiplus, libfontconfig) that are not present in minimal Docker base images. Alpine Linux is particularly problematic because IronPDF's native binary targets glibc, not musl. Use debian-slim or ubuntu as your base image.

How do I fix IronPDF in Docker?

Use IronPDF's official Docker base image (ironpdf/ironpdf-runtime), or manually install libgdiplus and libfontconfig in your Dockerfile. Also ensure your publish step uses the correct --runtime flag so the matching native binary is included in the image.

Is there a DLL-free IronPDF alternative?

PDFluent has no native DLL requirements. It is a single Rust binary that links statically, making it ideal for containerised deployments where you want to control every dependency explicitly.

## Related guides

[Migrate from IronPDF to PDFluent](https://pdfluent.com/migrate/from-commercial/#from-ironpdf)[Fix: corrupt PDF parse error](https://pdfluent.com/errors/corrupt-pdf/)

Read the docs
