Skip to content
English
  • There are no suggestions because the search field is empty.

How to run IronPdf on Linux ARM?

Running IronPdf on Linux ARM currently requires setting an environment variable due to a known limitation with Chromium Embedded Framework (CEF). This article explains the issue, workaround, and how to configure it correctly.

IronPdf’s PDF rendering engine relies on Chromium Embedded Framework (CEF), which currently presents a limitation on Linux ARM/ARM64 platforms related to Thread Local Storage (TLS).

Issue Description

When attempting to run IronPdf on Linux ARM, the following error is encountered:

cannot allocate memory in static TLS block

This error occurs when the Linux dynamic linker cannot allocate enough TLS memory to load libcef.so. It is a known issue in CEF, particularly with newer versions that require more TLS slots than the system provides by default.

See official reference: CEF Forum – Static TLS block error on ARM

Current Status & Workaround

IronPdf can work on Linux ARM64, but with a manual workaround:

Required Step

You must set the LD_PRELOAD environment variable to preload libcef.so before your application starts.

Example (non-Docker):

export LD_PRELOAD=/path/to/libcef.so

Using Docker?

In a Docker environment, you can configure this directly in the Dockerfile:

ENV LD_PRELOAD=/app/runtimes/linux-arm64/native/libcef.so

Here is a sample Dockerfile that worked in testing:

# Base image for runtime (ARM64)
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
USER root
WORKDIR /app
RUN apt update \
    && apt install -y sudo libxkbcommon-x11-0 libc6 libc6-dev libgtk2.0-0 libnss3 libatk-bridge2.0-0 libx11-xcb1 libxcb-dri3-0 libdrm-common libgbm1 libasound2 libxrender1 libfontconfig1 libxshmfence1 libgdiplus libva-dev
# Base image for build (ARM64)
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish -c Release -o /app/publish
# Final image with IronPdf and system dependencies
FROM base AS final
WORKDIR /app
ENV LD_PRELOAD=/app/runtimes/linux-arm64/native/libcef.so
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "IronPdfLinuxArm.dll"]