fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.33k stars 306 forks source link

libpam.so.0 not found but is installed? (zig on nixpkgs) #644

Closed Scary-Guy closed 2 months ago

Scary-Guy commented 2 months ago

"zig build" works fine, but when I do "zig build run" I get the following:

/home/user/.git/ly/zig-out/bin/ly: error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory
run
└─ run ly failure
error: the following command exited with error code 127:
/home/user/.git/ly/zig-out/bin/ly 
Build Summary: 5/7 steps succeeded; 1 failed (disable with --summary none)
run transitive failure
└─ run ly failure
error: the following build command failed with exit code 1:
/home/user/.git/ly/zig-cache/o/ea739dd52fbed88deb819cb2f6f9467d/build /nix/store/fv7g9mb7z48r3ld2p8arcpf5rrwg5kgg-zig-0.12.1/bin/zig /home/user/.git/ly /home/user/.git/ly/zig-cache /home/scary-guy/.cache/zig --seed 0x9012cce8 -Z001bd8ed73385347 run

libpam.so.0 exists on the system (multiple times apparently) so I'm not sure why it's saying that it isn't finding it?

Any advice on how to proceed would be appreciated. The environment is Regolith Desktop 3 (Ubuntu 24.04) and I ripped out the entire Snap system which is why I'm using Nixpkgs instead.

NETLIFYHOSTINGAHMD commented 2 months ago

I was getting a similar error which I solved by installing pam-devel on void

NETLIFYHOSTINGAHMD commented 2 months ago

try running with sudo

Scary-Guy commented 2 months ago

I was getting a similar error which I solved by installing pam-devel on void

Note, selecting 'libpam0g-dev' instead of 'libpam-dev
libpam0g-dev is already the newest version (1.5.3-5ubuntu5.1)

🤷🏻‍♂️

Scary-Guy commented 2 months ago

try running with sudo

"sudo: zig: command not found" but it works fine with the user account. 🤷🏻‍♂️🤷🏻‍♂️🤷🏻‍♂️

Sometimes I just want to shut this off and go into the woods and shape rocks into points with other rocks or something.

NETLIFYHOSTINGAHMD commented 2 months ago

bro just install another distro like void or artix linux

NETLIFYHOSTINGAHMD commented 2 months ago

I think its zig command not found cuz ur using a different shell on ur root account and the enviroment variable is not set on it

Scary-Guy commented 2 months ago

bro just install another distro like void or artix linux

That is very much not a helpful answer. Also I'm kinda stuck with this because of VR needs.

I think its zig command not found cuz ur using a different shell on ur root account and the enviroment variable is not set on it

That is quite possible...

NETLIFYHOSTINGAHMD commented 2 months ago

bro just install another distro like void or artix linux

That is very much not a helpful answer. Also I'm kinda stuck with this because of VR needs.

I think its zig command not found cuz ur using a different shell on ur root account and the enviroment variable is not set on it

That is quite possible...

Trust me. It's the right answer

NETLIFYHOSTINGAHMD commented 2 months ago

you'll eventually to smth else after headaches. Not sustainable.

AnErrupTion commented 2 months ago

@Scary-Guy While I haven't tried reproducing yet, this very much looks like an issue with Nix, especially since it can't find the library. Is there a way you can try building without Nix?

Scary-Guy commented 2 months ago

@Scary-Guy While I haven't tried reproducing yet, this very much looks like an issue with Nix, especially since it can't find the library. Is there a way you can try building without Nix?

Sorry this has taken me a bit to get to.

I tried to download Zig and add it to my $PATH but the system just refused to see it. Restarted, stuck it into a directory already in the $PATH, source ~/.bashrc, and everything else I could think of to try to get it to parse. It just simply refuses too which is why I tried Nix in the first place which was the only way that when I ran "zig version" it would actually parse and show the version. It makes me feel a little defeated and want to go back to using just a login prompt and then using startx.

But that sounds more like a problem with Zig or myself than Ly-DM. This could also very well be the same though, a problem with Zig or myself (or as you said Nix which just adds another cog into the works.)

In any case I will try and get back with whatever I find. Though it may take me a while because executive dysfunction just be like that yo.

Scary-Guy commented 2 months ago

Okay, so I just downloaded Zig 0.12.0 from the site and managed to trick it into working by creating a symlink in ~/.local/bin and that seems to have worked because zig build run actually did what it was supposed to. I will try to complete the rest of the steps.

As it stands this no longer applies though so I'm closing it, but it is not "fixed" and may still be an issue for others trying it this way.