IronPDF トラブルシューティング IronPdf.Linux LinuxでIronPdf.Linuxを動かす:セットアップガイド カーティス・チャウ 更新日:2025年6月1日 IronPDF をダウンロード NuGet ダウンロード DLL ダウンロード Windows 版 無料トライアル LLM向けのコピー LLM向けのコピー LLM 用の Markdown としてページをコピーする ChatGPTで開く このページについてChatGPTに質問する ジェミニで開く このページについてGeminiに問い合わせる Grokで開く このページについてGrokに質問する 困惑の中で開く このページについてPerplexityに問い合わせる 共有する Facebook で共有 Xでシェア(Twitter) LinkedIn で共有 URLをコピー 記事をメールで送る This article was translated from English: Does it need improvement? Translated View the article in English Linux用のIronPdfは約280MBです(IronPdfのコードとChromeブラウザ全体を含む)。 Dockerイメージは約500MBです。 Chromeには、Linuxディストリビューションに応じて異なる基本的なパッケージが必要です。 多くのLinuxディストリビューションはすでにこれらのパッケージがインストールされています。これらはさまざまなアプリケーションやライブラリで使用されるためです。 しかし、最低限のディストリビューションを使用している場合は、ChromeをLinux上で動作させるために必要なLinuxパッケージをインストールする必要があります。 注: デバッグを容易にするため、次の設定をすることができます。 // Enable detailed debugging for IronPdf IronPdf.Logging.Logger.EnableDebugging = true; // Specify the log file path IronPdf.Logging.Logger.LogFilePath = "Default.log"; // Set the logging mode to capture all log data IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All; // Enable detailed debugging for IronPdf IronPdf.Logging.Logger.EnableDebugging = true; // Specify the log file path IronPdf.Logging.Logger.LogFilePath = "Default.log"; // Set the logging mode to capture all log data IronPdf.Logging.Logger.LoggingMode = IronPdf.Logging.Logger.LoggingModes.All; $vbLabelText $csharpLabel 小型のDockerイメージを作成する方法 1. 実行時にパッケージをインストールする サイズを縮小する 1 つの方法は、Docker イメージのビルド時ではなく、実行時に apt-get コマンドを実行することです。 Dockerfile から apt-get コマンドを削除します。 IronPDF を初期化する前、またはドキュメントをレンダリングする前に、Installation.LinuxAndDockerDependenciesAutoConfig = true; を設定します。 アプリケーションが、apt-get コマンドを実行するのに十分な権限で実行されていることを確認します。 注意: 最初のドキュメントをレンダリングする前に apt-get コマンドを完了する必要があるため、最初の初期化は遅くなります。また、このプロセスはイメージを再展開するたびに繰り返されます。 注: コンソール/ログに、パッケージのインストールが正常に完了したことを示すエントリが表示されるはずです。 Executing command 'apt install -y libnss3' in '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: libnspr4 The following NEW packages will be installed: libnspr4 libnss3 0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded. Executing command 'apt install -y libnss3' in '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: libnspr4 The following NEW packages will be installed: libnspr4 libnss3 0 upgraded, 2 newly installed, 0 to remove and 9 not upgraded. SHELL 2. IronPdf.Slimを使用 また、IronPdf.dllのみを含め、必要なファイルを実行時にダウンロードすることも選択できます。 プロジェクトからIronPdf.Linux(およびその他のIronPdf)NuGetパッケージを削除し、IronPdf.Slimを追加します。 IronPDF を初期化する前、またはドキュメントをレンダリングする前に、Installation.AutomaticallyDownloadNativeBinaries = true; を設定します。 Dockerfile がアプリケーションの作業ディレクトリ全体に対する読み取りおよび書き込み権限を付与していることを確認します (例: RUN chmod +rwx /app/runtimes/linux-x64/native/IronCefSubprocess を RUN chmod +rwx /app/ に変更します)。 注: 最初の初期化時には、NuGetパッケージのダウンロードと展開が最初のドキュメントをレンダリングする前に行われるため遅くなります。このプロセスは、イメージを再デプロイするたびに繰り返されます。 注: コンソール/ログに、ダウンロードと展開が正常に完了したことを示すエントリが表示されるはずです。 Downloading NuGet package from 'https://www.nuget.org/api/v2/package/IronPdf.Native.Chrome.Linux/2023.1.11387' Extracting package contents '/app/bin/Debug/netcoreapp3.1/IronPdf.Native.Chrome.Linux.2023.1.11387.nupkg/runtimes/linux-x64/native' to '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Successfully deployed NuGet package 'IronPdf.Native.Chrome.Linux' to '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Successfully located 'IronInterop' at '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Downloading NuGet package from 'https://www.nuget.org/api/v2/package/IronPdf.Native.Chrome.Linux/2023.1.11387' Extracting package contents '/app/bin/Debug/netcoreapp3.1/IronPdf.Native.Chrome.Linux.2023.1.11387.nupkg/runtimes/linux-x64/native' to '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Successfully deployed NuGet package 'IronPdf.Native.Chrome.Linux' to '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' Successfully located 'IronInterop' at '/app/bin/Debug/netcoreapp3.1/runtimes/linux-x64/native' SHELL 3. 結論 _初期コンテナサイズを削減する_ための要約: IronPdf.Slim NuGetパッケージを使用します。 IronPdfを設定します: // Set installation options for Linux and Docker environments Installation.LinuxAndDockerDependenciesAutoConfig = true; Installation.AutomaticallyDownloadNativeBinaries = true; // Set installation options for Linux and Docker environments Installation.LinuxAndDockerDependenciesAutoConfig = true; Installation.AutomaticallyDownloadNativeBinaries = true; $vbLabelText $csharpLabel アプリケーションディレクトリが書き込み可能/実行可能であることを確認します: RUN chmod +rwx /app/ 1と2の両方のポイントを利用する非常にスリムなDockerイメージは、サイズを約500MBから約200MBに削減するはずです。 可能であれば、スリムなデプロイメントを選ばない場合に最高のパフォーマンスが得られることを知っておいてください。 一部のコンテナ化された環境およびクラウド環境は永続的ではないため、依存関係を再度ダウンロードしたり、apt-get コマンドを再度実行したりする必要があり、これには数分かかる場合があります。 しかし、開発者の中にはデプロイメントのサイズに厳しい要件がある場合も理解しています。 カーティス・チャウ 今すぐエンジニアリングチームとチャット テクニカルライター Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。 準備はできましたか? Nuget ダウンロード 17,803,474 | バージョン: 2026.3 リリース 無料トライアル NuGet 無料版 総ダウンロード数: 17,803,474 ライセンスを見る まだスクロールしていますか? すぐに証拠が欲しいですか? PM > Install-Package IronPdf サンプルを実行するHTML が PDF に変換されるのを確認します。 NuGet 無料版 総ダウンロード数: 17,803,474 ライセンスを見る