IronPDF Ubuntu 24.04 Dependency Issue on .NET 9 and .NET 10
On Ubuntu 24.04 with .NET 9 or .NET 10, IronPDF fails to install its required system dependencies at startup. This affects Azure Linux images and non-Docker Linux environments where the application does not run with root privileges.
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
Ubuntu 24.04 renamed the audio library from libasound2 to libasound2t64. IronPDF's automatic dependency installer targets the original libasound2 package name and cannot acquire the APT lock when running as a non-root user, producing the permission error shown above.
Solution
Option 1: Enable automatic dependency configuration (Docker and Azure Linux)
Set LinuxAndDockerDependenciesAutoConfig to true before the first render call:
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = true;
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = true;
IronPdf.Installation.LinuxAndDockerDependenciesAutoConfig = True
To capture diagnostic output during startup, enable file logging:
IronSoftware.Logger.LoggingMode = IronSoftware.Logger.LoggingModes.File;
IronSoftware.Logger.LogFilePath = "ironpdf.log";
IronSoftware.Logger.LoggingMode = IronSoftware.Logger.LoggingModes.File;
IronSoftware.Logger.LogFilePath = "ironpdf.log";
IronSoftware.Logger.LoggingMode = IronSoftware.Logger.LoggingModes.File
IronSoftware.Logger.LogFilePath = "ironpdf.log"
Option 2: First-launch with elevated privileges (non-Docker Linux)
For non-Docker Linux environments, run the application once with elevated privileges so IronPDF can install the required packages:
sudo -E dotnet run
sudo -E dotnet run
If dotnet is not found under sudo, use the full path:
sudo -E ~/.dotnet/dotnet run
sudo -E ~/.dotnet/dotnet run
After the first launch installs dependencies, subsequent runs do not require elevated privileges. For the full list of packages required on Ubuntu 24.04, see the Linux deployment guide.

