Running on linux requires libssl 1.0, thus fails
See original GitHub issueReproduction steps
- Use Ubuntu 20 or 22
- Install
LibGit2Sharp
in dotnet project - Run code that does
Repository.Clone(...)
Expected behavior
Repo is cloned
Actual behavior
An exception is thrown:
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
System.DllNotFoundException: Unable to load shared library 'git2-106a5f2' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/runtimes/linux-x64/native/git2-106a5f2.so: cannot open shared object file: No such file or directory
/home/USER/.dotnet/shared/Microsoft.NETCore.App/7.0.1/git2-106a5f2.so: cannot open shared object file: No such file or directory
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/git2-106a5f2.so: cannot open shared object file: No such file or directory
libssl.so.1.0.0: cannot open shared object file: No such file or directory
/home/USER/.dotnet/shared/Microsoft.NETCore.App/7.0.1/libgit2-106a5f2.so: cannot open shared object file: No such file or directory
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/libgit2-106a5f2.so: cannot open shared object file: No such file or directory
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/runtimes/linux-x64/native/git2-106a5f2: cannot open shared object file: No such file or directory
/home/USER/.dotnet/shared/Microsoft.NETCore.App/7.0.1/git2-106a5f2: cannot open shared object file: No such file or directory
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/git2-106a5f2: cannot open shared object file: No such file or directory
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/runtimes/linux-x64/native/libgit2-106a5f2: cannot open shared object file: No such file or directory
/home/USER/.dotnet/shared/Microsoft.NETCore.App/7.0.1/libgit2-106a5f2: cannot open shared object file: No such file or directory
/home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/libgit2-106a5f2: cannot open shared object file: No such file or directory
Using LD_DEBUG=files
, I get this (among other things):
10607: file=libssl.so.1.0.0 [0]; needed by /home/USER/dev/projects/PROJECT/src/PROJECT.Cli/bin/Release/net7.0/runtimes/linux-x64/native/libgit2-106a5f2.so
Version of LibGit2Sharp (release number or SHA1)
0.26.2
Operating system(s) tested; .NET runtime tested
- Ubuntu 20.04 (WSL), .NET 7.0.1
- Ubuntu 22.04 (azure devops), .NET 7.0.1
Issue Analytics
- State:
- Created 9 months ago
- Comments:7
Top Results From Across the Web
Ubuntu 20.04: libssl.so.1.0.0: cannot open shared object file
I ran into the same issue I think (I had the same error message trying to launch RStudio after upgrading Ubuntu from 18.04...
Read more >2.3.1 build fails on Ubuntu 18.04 with libssl-dev installed
I made this observation while operating on a fresh install of Debian 9. On Debian, It seems as though installing libssl1.0-dev bumps away...
Read more >How To Fix "error loading shared libraries: libssl.so.1.0.0" ...
so.1.0.0: cannot open shared object file: No such file or directory” indicates that the system is unable to find the libssl.so.
Read more >Building Python and OpenSSL from source, but ssl module ...
I haven't used pkg-config before and it's giving me: Package libssl was not found in the pkg-config search path. Perhaps you should add...
Read more >Workaround for libssl issue on Ubuntu 22.04
If when opening the editor on the new LTS 22.04 you get the error 'No useable version of libssl' it's due to a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Miepee No, I have only tested on Ubuntu
So seems like there’s something else that influences it too then, if the issue both happens and doesn’t happen on ubuntu 22.04 with the same preview package.
@mirkomaty if you set
LD_DEBUG=files
, do you also see the same as in the first comment?