Closed spookylukey closed 1 month ago
Does the normal installation from the official Nix Download work?
sh <(curl -L https://nixos.org/nix/install) --no-daemon
I get the same error:
sh <(curl -L https://nixos.org/nix/install) --no-daemon ~/devel/clients/FIRMA [08:05]
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 4267 100 4267 0 0 6728 0 --:--:-- --:--:-- --:--:-- 6728
downloading Nix 2.24.9 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.24.9/nix-2.24.9-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.s9R2CgPRGY'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22.5M 100 22.5M 0 0 8018k 0 0:00:02 0:00:02 --:--:-- 8016k
Note: a multi-user installation is possible. See https://nixos.org/manual/nix/stable/installation/installing-binary.html#multi-user-installation
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown luke /nix' using sudo
copying Nix to /nix/store......................................................
installing 'nix-2.24.9'
building '/nix/store/l9ab6qm37vw0g8vblfzrj387khq6qql1-user-environment.drv'...
error: opening lock file '/nix/var/nix/profiles/per-user/luke/profile.lock': No such file or directory
/tmp/nix-binary-tarball-unpack.s9R2CgPRGY/unpack/nix-2.24.9-x86_64-linux/install: unable to install Nix into your default profile
So this looks like an upstream issue - although one you maybe want to be aware of, as I can't be the only one who hits this.
yes, this is a nix issue... but try this:
mkdir -m 0755 -p /nix/var/nix/profiles/per-user/luke
and running the installer again.
i actually only found this one issue that hasn't been resolved yet. https://github.com/cachix/devenv/issues/1225
OK, I think the issue was I had an existing ~/.nix-profile
symlink:
/home/luke/.nix-profile -> /nix/var/nix/profiles/per-user/luke/profile
After removing this, the installation succeeded, without having to manually create the missing directory. I'm guessing I may have tried to install Nix in the past? My root system is a clean install of Linuxmint, but my home directory is anything but clean...
So I'm guessing this is really a Nix install bug, but not one that most people will trip up over, so I'm closing the ticket.
Glad your issue could be resolved. The issue might have occured because you copied your home directory without uninstalling nix beforehand (removing /nix on a single-user installation) which kept the symlink in your home.
What happened?
devbox attempted to perform a single-user installation of Nix and failed, with the following output:
Steps to reproduce
On a pretty clean machine (very recent fresh installation of Linuxmint 22), I did this:
Installed devbox:
Success.
Init a new project:
Added my first dependency:
Result was the above.
Attempting to run again, I got this instead:
If I remove
/nix
and try again, I get exactly the same error.Command
add
devbox.json
Devbox version
0.13.5
Nix version
No response
What system does this bug occur on?
Linux (x86-64)
Debug logs