libgit2 / libgit2/libgit2sharp

NativeMethods. Version GLIBC_2.25' not found

未關閉
#2,123 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C#
星號
3.5k
分支
925
PR 合併指標
30 天內沒有已合併 PR

描述

Hi!

I test my LibGit2Sharp application on old Linux platform and stuck with error, after some research i execute ldd command inside terminal:

ldd libgit2-a418d9d.so

Output:
version GLIBC_2.25' not found (required by /usr/lib/versioncontrol/libgit2-a418d9d.so)

It seems that this is the real cause of the load DLL error.

How can I embed this dependency directly into the application so that it doesn't try to look for it in the system?
Currently, GLIBC_2.24 is installed on the machine. Updating GLIBC to a newer version, like 2.25, is not possible due to company policies.

Reproduction steps

Start application and execute "pull" command through LibGit2Sharp.

Expected behavior

Execute of "pull" command successfully finished.

Actual behavior

Error on application "Pull" command:
The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
InnerException = {"Unable to load DLL 'git2-a418d9d' or one of its dependencies: }

Version of LibGit2Sharp (release number or SHA1)

0.30.0

Operating system(s) tested; .NET runtime tested

Astra Linux 1.6

Screenshot 2024-08-28 at 2 39 41 PM

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

先在使用 LibGit2Sharp 0.30.0 的 Astra Linux 1.6 上重現 pull 命令失敗,然後檢查 libgit2-a418d9d.so 的 ldd 輸出以及 NativeMethods 的型別初始設定式例外。判定是否能在應用程式內處理 GLIBC_2.25 相依性;當 pull 命令在具有 GLIBC_2.24 的系統上完成且沒有 DLL 載入錯誤時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp
領域
operating-systems
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。