IronOCR 故障排除 libgdiplus Using libgdiplus with IronOCR: Setup Guide Curtis Chau 更新日期:6月 1, 2025 Download IronOCR NuGet 下載 DLL 下載 Windows 安裝程式 Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article This article was translated from English: Does it need improvement? Translated View the article in English .NET Core requires libgdiplus to use the Microsoft System.Drawing.Common NuGet package. 如果在 macOS 或 Linux 上找不到,您可能會遇到此例外情況: 未處理的異常。 System.DllNotFoundException:無法找到或載入任何名稱的本機庫:[ libgdiplus, libgdiplus.so ] _如果您看到 System.TypeInitializationException:The type initializer for 'Gdip' threw an exception, then please read our [System.Drawing.Common in NET6](https://ironpdf.com/troubleshooting/system-drawing-common-ironpdf/「>System.Drawing.Common in NET6 guide instead._請閱讀我們的 <a href=」https://ironpdf.com/troubleshooting/system-drawing-common-ironpdf/) 指南。 Linux。 Ubuntu、Debian。 若要在 Ubuntu 或 Debian 上安裝所需的函式庫,請執行下列指令: # Update package lists and install necessary libraries sudo apt-get update && sudo apt-get install -y apt-utils libgdiplus libc6-dev # Update package lists and install necessary libraries sudo apt-get update && sudo apt-get install -y apt-utils libgdiplus libc6-dev SHELL Docker 在您的 Dockerfile 中加入以下一行,以確保 Docker 映像檔中包含必要的函式庫: # Update package lists and install necessary libraries in Docker container RUN apt-get update && apt-get install -y apt-utils libgdiplus libc6-dev macOS 如果您在 macOS 上遇到以下異常: 未處理的異常。 System.DllNotFoundException:無法找到或載入任何名稱的本機庫:[ libgdiplus, libgdiplus.dylib ] 您可以透過以下方式解決: 在您的 .NET 解決方案中加入 runtime.osx.10.10-x64.CoreCompat.System.Drawing NuGet 套件,以便在專案中包含 libgdiplus。 您也可以使用以下指令,透過 Homebrew 手動安裝函式庫: # Update Homebrew and install mono-libgdiplus brew update && brew install mono-libgdiplus # Update Homebrew and install mono-libgdiplus brew update && brew install mono-libgdiplus SHELL 更多資訊請參閱官方 .NET Core 文件。 Curtis Chau 立即與工程團隊聊天 技術作家 Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。 準備好開始了嗎? Nuget 下載 5,044,537 | 版本: 2025.11 剛剛發布 免費 NuGet 下載 總下載量:5,044,537 查看許可證