Build.sh installation error with curl

Good morning, I have a problem with the installation of the curl when I install the build.sh and the problem is that the installation of the curl https://nixos.org/nix/install , does not work, it does not load at all and this is the result:

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

I tried it in Kali and in git bash and it comes out the same, is it a mistake by me or by the branch? Thank you very much.

You are trying in Kali or in Kali for WSL?

I present the same error when I was trying to install that in Kali for WSL and I follow this to fix it.

But you can follow this things:

you must have root or sudo permissions.

This is another way to install nix:

You can found that things in this Link

Thank you very much, I will see if it works for me with your advice, I am in Kali as such, I have it installed to the hard disk together with Windows and I have never had that error, I do not know if it is something that is wrong in the branch, thank you very much.

I am having the same problem and the solution proposed by Pastel-Code does not work for me.

WHAT HAPPENS

I have Ubuntu 20.04 LTS installed on VirtualBox as a virtual machine on windows 10.
I am following the installation instructions of the official NIX website (here) and I get this:

sudo curl -L https://nixos.org/nix/install | sh


% 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  2699  100  2699    0     0   2409      0  0:00:01  0:00:01 --:--:--  2409
downloading Nix 2.3.13 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.3.13/nix-2.3.13-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.QzFvwFmkAq'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file 
Warning: /tmp/nix-binary-tarball-unpack.QzFvwFmkAq/nix-2.3.13-x86_64-linux.tar.
Warning: xz: No such file or directory
  0 25.7M    0 16053    0     0  33030      0  0:13:36 --:--:--  0:13:36 33030
curl: (23) Failure writing output to destination
sh: failed to download 'https://releases.nixos.org/nix/nix-2.3.13/nix-2.3.13-x86_64-linux.tar.xz'

I tried the other alternative proposed earlier on this thread and on the nix website and I get this when running the first line as root:

curl -o install-nix-2.3.13 https://releases.nixos.org/nix/nix-2.3.13/install
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file install-nix-2.3.13: Permission denied
 53  2699   53  1448    0     0   4148      0 --:--:-- --:--:-- --:--:--  4160
curl: (23) Failure writing output to destination

I have also tried with with sudo and it still doesnt work.

I NEED HELP

Any idea on how to continue?

Thanks!

I tried what you proposed and I got the same answer

sudo curl -L https://nixos.org/nix/install | sh
  % 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  2699  100  2699    0     0   3743      0 --:--:-- --:--:-- --:--:--  3743
downloading Nix 2.3.13 binary tarball for x86_64-linux from 'https://releases.nixos.org/nix/nix-2.3.13/nix-2.3.13-x86_64-linux.tar.xz' to '/tmp/nix-binary-tarball-unpack.NdxH0henu7'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file 
Warning: /tmp/nix-binary-tarball-unpack.NdxH0henu7/nix-2.3.13-x86_64-linux.tar.
Warning: xz: No such file or directory
  0 25.7M    0 16046    0     0   152k      0  0:02:53 --:--:--  0:02:53  152k
curl: (23) Failure writing output to destination
sh: failed to download 'https://releases.nixos.org/nix/nix-2.3.13/nix-2.3.13-x86_64-linux.tar.xz'

However I already installed NIX with a different workaround, not very orthodox though.

My solution:

I downloaded the compressed file via browser by pasting the url into my mozilla

https://releases.nixos.org/nix/nix-2.3.13/nix-2.3.13-x86_64-linux.tar.xz

Then via shell, I went to the folder, extracted it, changed the permits to the install script and ran it.

~/Downloads$ tar -xf nix-2.3.13-x86_64-linux.tar.xz 
~/Downloads$ cd nix-2.3.13-x86_64-linux/
~/Downloads/nix-2.3.13-x86_64-linux$ sudo su 
~/Downloads/nix-2.3.13-x86_64-linux# chown -R <USER> /nix
~/Downloads/nix-2.3.13-x86_64-linux# su <USER>
~/Downloads/nix-2.3.13-x86_64-linux$ ./install
Note: a multi-user installation is possible. See https://nixos.org/nix/manual/#sect-multi-user-installation
performing a single-user installation of Nix...
copying Nix to /nix/store............................................
installing 'nix-2.3.13'
building '/nix/store/a5flrqya8iv60jbrr5zsj0fs0g4wd4gz-user-environment.drv'...
created 6 symlinks in user environment
unpacking channels...
created 1 symlinks in user environment
modifying /home/<USER>/.profile...

Installation finished!  To ensure that the necessary environment
variables are set, either log in again, or type

  . /home/<USER>/.nix-profile/etc/profile.d/nix.sh

in your shell.

Then I type this to test installation, I get this.

~/Downloads/nix-2.3.13-x86_64-linux$ nix-env -qs
IPS  nix-2.3.13

I guess it means it’s alright now

Just for discarding possibilities, have you checked if the download it’s been blocked by your
antivirus? (just saying)

To my understanding my windows system has no antivirus, and regarding the virtual machine, there are no anti-virus in Ubuntu as far as I know. But it might be.