nix icon indicating copy to clipboard operation
nix copied to clipboard

macOS stuck in --update nixpkgs

Open lknt opened this issue 1 year ago • 2 comments

Platform

macOS

Additional information

It keeps getting stuck at sudo HOME=/var/root NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /nix/store/7mb1mcpmjphg5bgc8m7m0gxrsshrzsk7-nix-2.24.7/bin/nix-channel --update nixpkgs. but I can download https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.xz using my browser.

Output

Output

<!-- paste console output here and remove this comment -->

    $ sudo HOME=/var/root NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /nix/store/7mb1mcpmjphg5bgc8m7m0gxrsshrzsk7-nix-2.24.7/bin/nix-channel --update nixpkgs

to update the default channel in the default profile

warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.xz': HTTP error 200 (curl error: Timeout was reached); retrying in 255 ms
warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.xz': HTTP error 200 (curl error: Timeout was reached); retrying in 521 ms
warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.xz': Timeout was reached (28); retrying in 1250 ms
warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.xz': Timeout was reached (28); retrying in 2346 ms
warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.bz2': Timeout was reached (28); retrying in 279 ms
warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.bz2': Timeout was reached (28); retrying in 645 ms
warning: error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.bz2': Timeout was reached (28); retrying in 1214 ms
error: unable to download 'https://releases.nixos.org/nixpkgs/nixpkgs-24.11pre683804.a1d92660c6b3/nixexprs.tar.bz2': HTTP error 404

       response body:

       404

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo install -m 0664 /var/folders/k9/_swm223n56xd875xlt34z3rm0000gn/T/tmp.8o8xFcwnFd/nix.conf /etc/nix/nix.conf

to place the default nix daemon configuration (part 2)

Password:
Sorry, try again.
Password:

~~> Setting up the nix-daemon LaunchDaemon

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo /usr/bin/install -m u=rw,go=r /nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist /Library/LaunchDaemons/org.nixos.nix-daemon.plist

to set up the nix-daemon as a LaunchDaemon


---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist

to load the LaunchDaemon plist for nix-daemon

Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.

---- sudo execution ------------------------------------------------------------
I am executing:

    $ sudo launchctl kickstart -k system/org.nixos.nix-daemon

to start the nix-daemon

Alright! We're done!
Try it! Open a new terminal, and type:

  $ nix-shell -p nix-info --run "nix-info -m"

Thank you for using this installer. If you have any feedback or need
help, don't hesitate:

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

---- Reminders -----------------------------------------------------------------
[ 1 ]
Nix won't work in active shell sessions until you restart them.

[ 2 ]
I had trouble fetching the nixpkgs channel (are you offline?)
To try again later, run: sudo -i nix-channel --update nixpkgs

wurongfei@localhost backup % 
wurongfei@localhost backup % sudo -i nix-channel --update nixpkgs
-sh: nix-channel: command not found

Priorities

Add :+1: to issues you find important.

lknt avatar Sep 23 '24 16:09 lknt

It looks like there's a known issue here, and there was a candidate fix merged--but it caused its own problems, needed to be reverted, and that a fresh attempt to re-fix hasn't moved:

  • https://github.com/NixOS/nix/issues/10016
  • https://github.com/NixOS/nix/pull/10070
  • https://github.com/NixOS/nix/pull/10128
  • https://github.com/NixOS/nix/pull/10173
  • https://github.com/NixOS/nix/pull/10196

abathur avatar Sep 23 '24 21:09 abathur

Did you get this sorted out? If not, I stumbled on a comment I had forgotten about that may help?

  • https://github.com/NixOS/nix/issues/8081#issuecomment-1962419263

abathur avatar Oct 15 '24 04:10 abathur