libgit2 / libgit2/libgit2sharp.nativebinaries

Ubuntu 22.04 x64: could not load ssl libraries

未關閉
#151 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
PowerShell
星號
35
分支
74
PR 合併指標
30 天內沒有已合併 PR

描述

LibGit2Sharp.LibGit2SharpException: could not load ssl libraries
   at LibGit2Sharp.Core.Ensure.HandleError(Int32 result) in /_/LibGit2Sharp/Core/Ensure.cs:line 154
   at LibGit2Sharp.Core.Proxy.git_remote_connect(RemoteHandle remote, GitDirection direction, GitRemoteCallbacks& remoteCallbacks, GitProxyOptions& proxyOptions) in /_/LibGit2Sharp/Core/Proxy.cs:line 2172
   at LibGit2Sharp.Repository.ListRemoteReferences(String url, CredentialsHandler credentialsProvider) in /_/LibGit2Sharp/Repository.cs:line 689

Using a project with LibGit2Sharp built with dotnet publish --configuration Release --runtime linux-x64 --no-self-contained, resulting in libgit2-e632535.so, and running on .NET 6.0.415.

By using strace with some trial-and-error, it seems that LibGit2Sharp requires OpenSSL 1.1, but Ubuntu 22.04 (and higher, I assume) only ship with OpenSSL 3.

As a workaround, installing http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb fixes the issue and lets LibGit2Sharp run.

What needs to be done to make this work with OpenSSL 3?

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

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

研究方向

從 linux-x64 publish 產生的原生 libgit2-e632535.so,以及 Ensure.cs、Proxy.cs 和 Repository.cs 中的堆疊追蹤位置開始。使用 strace 或等效的相依性檢查來確認 Ubuntu 22.04 上要求了哪些 SSL 程式庫。完成標準是 LibGit2Sharp 能夠使用系統的 OpenSSL 3 程式庫連線到遠端儲存庫,而不需要安裝 libssl1.1。

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

評估

技術堆疊
linux, ubuntu
領域
backend, security
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

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

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