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

Bat library not loaded error #3032

Closed
ciscohack opened this issue Jul 18, 2024 · 7 comments
Closed

Bat library not loaded error #3032

ciscohack opened this issue Jul 18, 2024 · 7 comments
Labels
bug Something isn't working macOS Issue is related to the macOS build of bat

Comments

@ciscohack
Copy link

Hello expert,

I am getting errors with my BAT tool running on macOS 14.5. I am running the latest BAT 0.24 and bat completely un-usable

dyld[50896]: Library not loaded: /opt/homebrew/opt/libgit2@1.7/lib/libgit2.1.7.dylib
Referenced from: <968B81E5-4BAB-323C-8FD5-1BFB54F3052D> /opt/homebrew/Cellar/bat/0.24.0_1/bin/bat
Reason: tried: '/opt/homebrew/opt/libgit2@1.7/lib/libgit2.1.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libgit2@1.7/lib/libgit2.1.7.dylib' (no such file), '/opt/homebrew/opt/libgit2@1.7/lib/libgit2.1.7.dylib' (no such file), '/opt/homebrew/Cellar/libgit2/1.8.1/lib/libgit2.1.7.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libgit2/1.8.1/lib/libgit2.1.7.dylib' (no such file), '/opt/homebrew/Cellar/libgit2/1.8.1/lib/libgit2.1.7.dylib' (no such file)

image
@ciscohack ciscohack added the bug Something isn't working label Jul 18, 2024
@ElemenTP
Copy link

brew install libgit2@1.7 wiil fix this

@the0xalex
Copy link

Feels as though we could perhaps adjust the following dependency:

[[package]]
name = "libgit2-sys"
version = "0.16.2+1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8"
dependencies = [
"cc",
"libc",
"libz-sys",
"pkg-config",
]

Either add it to package manager deps so it gets dl'd (brew, apt, whatever) or fix the fact that it's depending on an old version of the lib.

I encountered this issue when applying a security update to libgit. I'd make a PR but I've no idea how the core maintainers would prefer to address this.

@ciscohack
Copy link
Author

thanks install lib solved the issue

@vanstrouble
Copy link

Is bat now going to use a precise version of that library (libgit2@1.7) or will they fix this over time?

@ciscohack
Copy link
Author

libgit2@1.7

If we install libgit2@1.7 via brew then the bat is correctly recognized and used it... But I feel they should fix it by code level should be better option

@eth-p eth-p added the macOS Issue is related to the macOS build of bat label Jul 31, 2024
@eth-p
Copy link
Collaborator

eth-p commented Jul 31, 2024

I'm going to close this in favour of #3029, which addresses the same problem.

Additionally, the Homebrew formula was updated on the 16th to point to the libgit2@1.7 instead of the latest version.

@eth-p eth-p closed this as completed Jul 31, 2024
@eth-p
Copy link
Collaborator

eth-p commented Jul 31, 2024

Is bat now going to use a precise version of that library (libgit2@1.7) or will they fix this over time?

The dependency will be updated to use the newer libgit2, don't worry 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Issue is related to the macOS build of bat
Projects
None yet
Development

No branches or pull requests

5 participants