-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
The nix (Nix) 2.21.0pre20240222_6a5210f statically compiled is not able to install packages in profile #6976
Labels
Comments
Some troubleshootingNote: it does not solve the original issue, in many environments it is not possible to create the /nix. In one terminal:
podman \
run \
--name=test-nix-static \
--privileged=true \
--interactive=true \
--tty=true \
--rm=true \
localhost/unprivileged-ubuntu24:latest \
bash podman \
exec \
--interactive=true \
--tty=true \
--user=0 \
test-nix-static \
bash \
-c \
'
mkdir -p /home/abcuser/.local/share/nix/root/nix
' In another terminal: podman \
exec \
--interactive=true \
--tty=true \
--user=0 \
test-nix-static \
bash \
-c \
'
mkdir /nix \
&& mount --bind /home/abcuser/.local/share/nix/root/nix /nix \
&& chown abcuser: /home/abcuser/.local/share/nix/root/nix
' podman \
exec \
--interactive=true \
--tty=true \
--user=abcuser \
test-nix-static \
bash \
-c \
'
nix profile install nixpkgs#hello
hello
' |
paste in your .SHELLrc
first run, dettach using ctrl-d |
I'm experiencing the same problem with a statically built nix without /nix, however nix shell seems to work:
|
PedroRegisPOAR
changed the title
The nix 2.12.0pre20220829_ddb82ff statically compiled is not able to install packages in profile
The nix 2.15.0pre20230405_3586e97 statically compiled is not able to install packages in profile
Apr 9, 2023
PedroRegisPOAR
changed the title
The nix 2.15.0pre20230405_3586e97 statically compiled is not able to install packages in profile
The nix 2.16.0pre20230524_6e45702 statically compiled is not able to install packages in profile
May 26, 2023
PedroRegisPOAR
changed the title
The nix 2.16.0pre20230524_6e45702 statically compiled is not able to install packages in profile
The nix (Nix) 2.17.0pre20230615_e672d52 statically compiled is not able to install packages in profile
Jun 16, 2023
PedroRegisPOAR
changed the title
The nix (Nix) 2.17.0pre20230615_e672d52 statically compiled is not able to install packages in profile
The nix (Nix) 2.18.0pre20230810_a1fdc68 statically compiled is not able to install packages in profile
Aug 10, 2023
PedroRegisPOAR
changed the title
The nix (Nix) 2.18.0pre20230810_a1fdc68 statically compiled is not able to install packages in profile
The nix (Nix) 2.19.0pre20231004_2f1c16d statically compiled is not able to install packages in profile
Oct 5, 2023
PedroRegisPOAR
changed the title
The nix (Nix) 2.19.0pre20231004_2f1c16d statically compiled is not able to install packages in profile
The nix (Nix) 2.19.0pre20231110_458e511 statically compiled is not able to install packages in profile
Nov 13, 2023
PedroRegisPOAR
changed the title
The nix (Nix) 2.19.0pre20231110_458e511 statically compiled is not able to install packages in profile
The nix (Nix) 2.20.0pre20240129_44a0d04 statically compiled is not able to install packages in profile
Feb 23, 2024
PedroRegisPOAR
changed the title
The nix (Nix) 2.20.0pre20240129_44a0d04 statically compiled is not able to install packages in profile
The nix (Nix) 2.21.0pre20240222_6a5210f statically compiled is not able to install packages in profile
Feb 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The command
nix profile install nixpkgs#hello
is not able to install thehello
package (or any other) fornix (Nix) 2.21.0pre20240222_6a5210f
statically compiled if/nix
does not exist and is not possible to be created.It errors:
Since
nix 2.10.0
it should work:Well, it is an "old problem":
Steps To Reproduce
It prints the following:
Expected behavior
hello
package should be installed with no errors./home/abcuser/.nix-profile
should be a symbolic link to*/home/abcuser/.local/share/nix/profiles/profile
NOT a broken one pointing to/home/abcuser/.local/state/nix/profiles/profile
. TODO: it is named "chroot store profile"?hello
command should work.*Editing: not sure where it should point to.
XDG_
directories if not disabled by the configuration/flag--use-xdg-base-directories
:XDG_
directories it shoud be:"$XDG_DATA_HOME/nix/profile"
based on Follow XDG Base Directory standard #5588 (comment) by Eelco;"$XDG_STATE_HOME/nix/profile"
based on Follow XDG Base Directory standard #5588 (comment) by Eelco;XDG_
directories:~/.local/share/nix/profile
or"$HOME"/.local/share/nix/profile
based on Follow XDG Base Directory standard #5588 (comment) by Eelco;~/.local/state/nix/profile
or"$HOME"/.local/state/nix/profile
? Follow XDG Base Directory standard #5588 (comment) https://www.reddit.com/r/Nix/comments/1443k3o/home_manager_installation_could_not_find_suitable/Additional context
Running interactively in the container:
Outputs
Edits
Time passes and new nix versions came out and I have been finding more references to add here, so updating it from time to time.
TODO: write an test that shows it, probably in this file https://github.com/NixOS/nix/blob/master/tests/functional/nix-profile.sh
It started with my self testing it here in
nix 2.12.0pre20220829_ddb82ff
Other details
How to get latest successful hydra build:
Refs.:
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: