Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitVersion.Tool does not find LibGit2 library on Ubuntu 19.04 #1744

Closed
rose-a opened this issue Jul 15, 2019 · 4 comments
Closed

GitVersion.Tool does not find LibGit2 library on Ubuntu 19.04 #1744

rose-a opened this issue Jul 15, 2019 · 4 comments

Comments

@rose-a
Copy link
Contributor

rose-a commented Jul 15, 2019

I installed GitVersion.Tool 5.0.0-beta5.11 on a freshly setup Ubuntu 19.04 machine with dotnet-sdk-2.2 using the dotnet cli.

When trying to execute it with dotnet gitversion from within a clone of the GitVersion repo, I get the following error message:

INFO [07/15/19 2:39:01:23] Working directory: /home/***/Repositories/GitVersion
INFO [07/15/19 2:39:01:23] IsDynamicGitRepository: False
ERROR [07/15/19 2:39:01:26] An unexpected error occurred:
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'git2-572e4d8' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgit2-572e4d8: cannot open shared object file: No such file or directory
   at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
   at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
   at LibGit2Sharp.Core.NativeMethods..cctor()
   --- End of inner exception stack trace ---
   at LibGit2Sharp.Core.NativeMethods.git_buf_dispose(GitBuf buf)
   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
   at LibGit2Sharp.Repository.Discover(String startingPath)
   at GitVersion.GitPreparer.GetDotGitDirectory() in D:\a\1\s\src\GitVersionCore\GitPreparer.cs:line 158
   at GitVersion.GitPreparer.GetProjectRootDirectory() in D:\a\1\s\src\GitVersionCore\GitPreparer.cs:line 172
   at GitVersion.ConfigFileLocator.Verify(GitPreparer gitPreparer, IFileSystem fileSystem) in D:\a\1\s\src\GitVersionCore\Configuration\ConfigFileLocator.cs:line 57
   at GitVersion.Program.VerifyArgumentsAndRun() in D:\a\1\s\src\GitVersionExe\Program.cs:line 97
INFO [07/15/19 2:39:01:26] 
INFO [07/15/19 2:39:01:26] Attempting to show the current git graph (please include in issue): 
INFO [07/15/19 2:39:01:26] Showing max of 100 commits

On a Ubuntu 18.04 server the tool works fine...

@arturcic
Copy link
Member

GitVersion has a dependency on Libgit2Sharp. As of now, there is no version of Libgit2Sharp that works on ubuntu 19.04. If you need it please create an issue on their repo. For now the supported version is 18.04

@rose-a
Copy link
Contributor Author

rose-a commented Jul 15, 2019

Got it working by compiling and installing LibGit2Sharp.NativeBinaries on the ubuntu 19.04 machine...

@arturcic
Copy link
Member

If you could send a PR to the LibGit2Sharp.NativeBinaries repo we will have that included in the future

@arturcic
Copy link
Member

Closing for now as you found a workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants