You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I download the latest static build of Nix from Hydra and try to use its "profile" functionality to install a package (say, nixpkgs#hello, I get the following error:
error: filesystem error: directory iterator cannot open directory: No such file or directory [/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1].
The binary apparently gets installed, but running it fails with the following error:
bash: /home/user_libvirt_fedora40/.local/share/nix/root/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1/bin/hello: cannot execute: required file not found
Run nix --extra-experimental-features nix-command --extra-experimental-features flakes profile install nixpkgs#hello
Observe that a download is taking place, but in the end the following error is displayed: error: filesystem error: directory iterator cannot open directory: No such file or directory [/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1]
Observe that the following file exists: ~/.local/share/nix/root/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1/bin/hello, but attempting to execute it results in the following error: bash: /home/user_libvirt_fedora40/.local/share/nix/root/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1/bin/hello: cannot execute: required file not found
Observe that ~/.nix-profile is a broken symlink to ~/.local/state/nix/profiles/profile, as the latter path doesn't exist. Creating this directory doesn't change the outputs of the commands mentioned above.
Observe that nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs#hello outputs Hello, world!, as expected
Expected behavior
Installation should have been completed successfully, the binary should run
nix-env --version output
Apparently, not applicable with a static build...?
Additional context
I would like to describe the intended use case here.
My goal is to use a static build of Nix in the same manner one would normally use conda/miniconda/miniforge on an HPC cluster. In this environment I don't have root privileges, so I can't install Nix "the normal way".
As I understand there are ways to get it running using various workarounds from third-parties, but if at all possible, I would prefer to go with official builds.
So ideally I would like to be able to download some standalone binary from Hydra, do something like nix ... install my long list of packages and have the corresponding executables runnable from my shell whenever I log in.
Please let me know if I am approaching the whole problem from the wrong angle. It is very likely that I got something wrong about how I should go about installing a static build, and probably I should have configured it in some manner, but the fact that the commands I mentioned above do create a user-local nix store but later fail to resolve what looks like a system-global nix path makes me think that there is also a bug somewhere.
I would be glad to help debug this further if it is not a misconfiguration on my part.
The text was updated successfully, but these errors were encountered:
Describe the bug
If I download the latest static build of Nix from Hydra and try to use its "profile" functionality to install a package (say,
nixpkgs#hello
, I get the following error:error: filesystem error: directory iterator cannot open directory: No such file or directory [/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1]
.The binary apparently gets installed, but running it fails with the following error:
bash: /home/user_libvirt_fedora40/.local/share/nix/root/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1/bin/hello: cannot execute: required file not found
Steps To Reproduce
chmod +x ~/.local/bin/nix
nix --extra-experimental-features nix-command --extra-experimental-features flakes profile install nixpkgs#hello
error: filesystem error: directory iterator cannot open directory: No such file or directory [/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1]
~/.local/share/nix/root/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1/bin/hello
, but attempting to execute it results in the following error:bash: /home/user_libvirt_fedora40/.local/share/nix/root/nix/store/bw9z0jxp5qcm7jfp4vr6ci9qynjyaaip-hello-2.12.1/bin/hello: cannot execute: required file not found
~/.nix-profile
is a broken symlink to~/.local/state/nix/profiles/profile
, as the latter path doesn't exist. Creating this directory doesn't change the outputs of the commands mentioned above.nix --extra-experimental-features nix-command --extra-experimental-features flakes run nixpkgs#hello
outputsHello, world!
, as expectedExpected behavior
Installation should have been completed successfully, the binary should run
nix-env --version
outputApparently, not applicable with a static build...?
Additional context
I would like to describe the intended use case here.
My goal is to use a static build of Nix in the same manner one would normally use conda/miniconda/miniforge on an HPC cluster. In this environment I don't have root privileges, so I can't install Nix "the normal way".
As I understand there are ways to get it running using various workarounds from third-parties, but if at all possible, I would prefer to go with official builds.
So ideally I would like to be able to download some standalone binary from Hydra, do something like
nix ... install my long list of packages
and have the corresponding executables runnable from my shell whenever I log in.Please let me know if I am approaching the whole problem from the wrong angle. It is very likely that I got something wrong about how I should go about installing a static build, and probably I should have configured it in some manner, but the fact that the commands I mentioned above do create a user-local nix store but later fail to resolve what looks like a system-global nix path makes me think that there is also a bug somewhere.
I would be glad to help debug this further if it is not a misconfiguration on my part.
The text was updated successfully, but these errors were encountered: