Skip to content
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

Installing any Nix package fails with Problem with the SSL CA cert (path? access rights?) (77) #608

Closed
philiptaron opened this issue Aug 17, 2023 · 7 comments

Comments

@philiptaron
Copy link

Your OS (Linux, Mac) and architecture (x86_64, aarch64)

$ uname -a
Darwin vesper 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul  5 22:17:35 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8112 arm64

Your nix-installer version (/nix/nix-installer --version)

$ /nix/nix-installer --version
nix-installer 0.11.0

The thing you tried to run (eg nix-installer)
What happened (the output of the command, please)

$ nix profile install nixpkgs#curl
error: unable to download 'https://cache.nixos.org/g8bqlgmpa4yg601w561qy2n576i6g0vh.narinfo': Problem with the SSL CA cert (path? access rights?) (77)

Every other package also has this same issue.

What you expected to happen

No error and curl installed in my local profile.

If you tried to fix it, what did you try?

I tried to run dtruss but I didn't get anything meaningful.

$ sudo dtruss nix profile install nixpkgs#curl
dtrace: system integrity protection is on, some features will not be available

SYSCALL(args) 		 = return
warning: $HOME ('/Users/philip') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
error: unable to download 'https://channels.nixos.org/flake-registry.json': Problem with the SSL CA cert (path? access rights?) (77)

I see an open issue for the production Nix installer: NixOS/nix#876

@Hoverbear
Copy link
Contributor

Any chance this machine used to have nix-darwin installed?

@philiptaron
Copy link
Author

I don't think so, but it's possible. How would I know?

@Hoverbear
Copy link
Contributor

The problem sounds extremely similar to what several users have previously reported. We did include a heuristic to detect nix-darwin in the newest version, but it's not surefire.

Maybe you could try this workaround? #449 (comment)

@philiptaron
Copy link
Author

Sorry for the delay. /etc/static was indeed symlinked to somewhere in /nix. I followed the instructions to delete, but when I try to uninstall, I get this:

$ /nix/nix-installer uninstall
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
`nix-darwin` installation detected, it must be removed before uninstalling Nix. Please refer to https://github.com/LnL7/nix-darwin#uninstalling for instructions how to uninstall `nix-darwin`.

Which I can't do, since attempting to run nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A uninstaller fails as before!

Hmm. Thorny!

@cole-h
Copy link
Member

cole-h commented Aug 24, 2023

FWIW I was able to resolve this by doing the following:

sudo rm /Library/LaunchDaemons/org.nixos.activate-system.plist
sudo launchctl bootout system/org.nixos.activate-system
/nix/nix-installer uninstall
sudo rm /etc/ssl/certs/* # I forget the exact filename, sorry
# run the installer again

Hope this helps!

@philiptaron
Copy link
Author

@cole-h, that resolved my issue! Thank you so much.

@nmrshll
Copy link

nmrshll commented Oct 13, 2023

@cole-h Your solution seems to have worked for me. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants