Installer fails when Nix is already installed #26

Open
opened 2024-09-24 17:46:35 +00:00 by rbt · 1 comment
Owner

Reported from a colleague at work:

Error

Error: 
   0: Install failure
   1: Error executing action
   2: Action `configure_nix` errored
   3: Action `setup_default_profile` errored
   4: Failed to execute command with status 100 `HOME="/root" NIX_SSL_CERT_FILE="/nix/store/i94lnwn66r5ksj3sd0m0h7a2nxg4slyg-nss-cacert-3.101/etc/ssl/certs/ca-bundle.crt" "/nix/store/k4m31q5ralky3z58b37jsr8hlc4ccarj-lix-2.91.0/bin/nix-env" "-i" "/nix/store/k4m31q5ralky3z58b37jsr8hlc4ccarj-lix-2.91.0"`, stdout: 
      stderr: installing 'lix-2.91.0'
      building '/nix/store/xbgfbzhn0c99rjcx6jg7ambq24xyisk6-user-environment.drv'...
      error: Unable to build profile. There is a conflict for the following files:

               /nix/store/3wqasl97rjiza3vd7fxjnvli2w9l30mk-nix-2.17.0/lib/systemd/system/nix-daemon.socket
               /nix/store/k4m31q5ralky3z58b37jsr8hlc4ccarj-lix-2.91.0/lib/systemd/system/nix-daemon.socket
      error: builder for '/nix/store/xbgfbzhn0c99rjcx6jg7ambq24xyisk6-user-environment.drv' failed with exit code 1


Metadata

key value
version 0.17.1
os linux
arch x86_64
Reported from a colleague at work: ## Error ``` Error: 0: Install failure 1: Error executing action 2: Action `configure_nix` errored 3: Action `setup_default_profile` errored 4: Failed to execute command with status 100 `HOME="/root" NIX_SSL_CERT_FILE="/nix/store/i94lnwn66r5ksj3sd0m0h7a2nxg4slyg-nss-cacert-3.101/etc/ssl/certs/ca-bundle.crt" "/nix/store/k4m31q5ralky3z58b37jsr8hlc4ccarj-lix-2.91.0/bin/nix-env" "-i" "/nix/store/k4m31q5ralky3z58b37jsr8hlc4ccarj-lix-2.91.0"`, stdout: stderr: installing 'lix-2.91.0' building '/nix/store/xbgfbzhn0c99rjcx6jg7ambq24xyisk6-user-environment.drv'... error: Unable to build profile. There is a conflict for the following files: /nix/store/3wqasl97rjiza3vd7fxjnvli2w9l30mk-nix-2.17.0/lib/systemd/system/nix-daemon.socket /nix/store/k4m31q5ralky3z58b37jsr8hlc4ccarj-lix-2.91.0/lib/systemd/system/nix-daemon.socket error: builder for '/nix/store/xbgfbzhn0c99rjcx6jg7ambq24xyisk6-user-environment.drv' failed with exit code 1 ``` ## Metadata |key|value| |--|--| |**version**|0.17.1| |**os**|linux| |**arch**|x86_64|

Thanks for the report! Can you tell me more about the environment? Running with trace logging enabled would also help a lot! (command-line flag -vv)

What I suspect has happened is that nix was installed, and lix-installer was launched to install lix. The installer doesn't yet know how to upgrade an existing installation, so I think it tried to install lix as if nix isn't installed and had an issue because the system already used a socket with the same name.

In any case, this is horrible UX. We should check for the existing install at the very least, and really we should support upgrading. For now, I think your colleague will have to run lix-installer uninstall and then run lix-installer install.

Thanks for the report! Can you tell me more about the environment? Running with trace logging enabled would also help a lot! (command-line flag `-vv`) What I suspect has happened is that `nix` was installed, and `lix-installer` was launched to install `lix`. The installer doesn't yet know how to upgrade an existing installation, so I think it tried to install `lix` as if `nix` isn't installed and had an issue because the system already used a socket with the same name. In any case, this is horrible UX. We should check for the existing install at the very least, and really we should support upgrading. For now, I think your colleague will have to run `lix-installer uninstall` and then run `lix-installer install`.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix-installer#26
No description provided.