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

bug: eza: error while loading shared libraries: libgit2.so.1.7: cannot open shared object file: No such file or directory #819

Open
chhoumann opened this issue Feb 4, 2024 · 8 comments
Labels
errors Something isn't working

Comments

@chhoumann
Copy link

chhoumann commented Feb 4, 2024

I just updated my WSL Ubuntu system (update, upgrade, cargo updates, brew updates, the works), and then found that I was unable to run eza. This is on v0.18.0 [+git].

I generally run either of the following commands, but not even plain eza worked:

alias ls="eza --icons --git"
alias l='eza -alg --color=always --group-directories-first --git'
alias ll='eza -aliSgh --color=always --group-directories-first --icons --header --long --git'
alias lt='eza -@alT --color=always --git'
alias llt="eza --oneline --tree --icons --git-ignore"
alias lr='eza -alg --sort=modified --color=always --group-directories-first --git'

However, every time I tried to run eza, I'd get this error:

eza: error while loading shared libraries: libgit2.so.1.7: cannot open shared object file: No such file or directory

My solution

I tried updating my Ubuntu from 22 to 24.04, but that didn't work. I also reinstalled a few times, checked for clashing dependencies between packages, etc., but nothing seemed to work.

Then I found this old PR: #192 & this comment on an issue on cargo-update: nabijaczleweli/cargo-update#243 (comment)

After running:

cargo install eza --force --features vendored-libgit2

the problem was solved.

So there's no problem for me anymore, but I wanted to ensure people who googled this issue would find a solution. Hope to save you 30 minutes :)

I'm not sure if there's an issue with the latest build or something, given the earlier PR that included vendored-libgit2?
There must be something I don't know, or haven't set up properly.
If it's just a mistake on my part, feel free to close the issue - the problem is solved, then.

Thanks!

@chhoumann chhoumann added the errors Something isn't working label Feb 4, 2024
@0x61nas
Copy link

0x61nas commented Apr 29, 2024

i have the same problem here after switching my nixos configs without restart

@cafkafk
Copy link
Member

cafkafk commented May 3, 2024

i have the same problem here after switching my nixos configs without restart

What's the output of uname -a and nix-info -h?

@0x61nas
Copy link

0x61nas commented May 3, 2024

$ uname -a

Linux Mayuri 6.8.7 #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 17 09:23:43 UTC 2024 x86_64 GNU/Linux

$ nix-info

system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.18.1, channels(root): "nixos-23.11", nixpkgs: /home/anas/.nix-defexpr/channels/nixpkgs

@cafkafk
Copy link
Member

cafkafk commented May 4, 2024

$ uname -a

Linux Mayuri 6.8.7 #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 17 09:23:43 UTC 2024 x86_64 GNU/Linux

$ nix-info

system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.18.1, channels(root): "nixos-23.11", nixpkgs: /home/anas/.nix-defexpr/channels/nixpkgs

I can't seem to reproduce this. Did you install from nixpkgs?

@0x61nas
Copy link

0x61nas commented May 4, 2024

Did you install from nixpkgs?

yup, as a system package

I can't seem to reproduce this.

I manage my configuration as a flake, and i do have eza listed in my system packages and my user packages in the home manager config, could this be the cause of the problem?

@cafkafk
Copy link
Member

cafkafk commented May 5, 2024

I manage my configuration as a flake, and i do have eza listed in my system packages and my user packages in the home manager config, could this be the cause of the problem?

I'm not sure, but you could try removing the user package and see if that changes something.

Also just to be sure, can you post the command you're running and the error output?

@0x61nas
Copy link

0x61nas commented May 11, 2024

I'm not sure, but you could try removing the user package and see if that changes something.

I did, and that seems to fix the switching issue. But the error appears again when i tried nix develop and fail

the exact error message:

eza: error while loading shared libraries: libgit2.so.1.7: cannot open shared object file: No such file or directory

image

@cafkafk
Copy link
Member

cafkafk commented May 12, 2024

Seems like your store is in a pretty cursed state, specially the no such file or directory errors seem worrying. Have you tried this on another machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
errors Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants