Problems downloading client from Github

On two machines, one at home and the other an AWS instance I can no longer install the client

When I run
curl -so- https://raw.githubusercontent.com/maidsafe/safe_network/master/resources/scripts/install.sh | bash
either from the command line or in a script I receive the same error on both machines - both Ubuntu 20.04.3

ubuntu@ip-172-31-7-155:~/comnet-install$ curl -so- https://raw.githubusercontent.com/maidsafe/safe_network/master/resources/scripts/install.sh | bash
=> Downloading Safe CLI package from 'https://github.com/maidsafe/safe_network/releases/download/0.55.0-0.53.0-0.46.0/sn_cli-0.46.0-x86_64-unknown-linux-musl.tar.gz'...
=> Saving to '/tmp/tmp.Hqa4yP4e6Q/sn_cli-0.46.0-x86_64-unknown-linux-musl.tar.gz'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   685  100   685    0     0   6820      0 --:--:-- --:--:-- --:--:--  6782
Warning: Failed to create the file
Warning: /tmp/tmp.Hqa4yP4e6Q/sn_cli-0.46.0-x86_64-unknown-linux-musl.tar.gz:
Warning: No such file or directory
  0 10.2M    0   852    0     0   1316      0  2:16:01 --:--:--  2:16:01  1316
curl: (23) Failure writing output to destination
=> Unpacking Safe CLI to '/home/ubuntu/.safe/cli'...
tar (child): /tmp/tmp.Hqa4yP4e6Q/sn_cli-0.46.0-x86_64-unknown-linux-musl.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Works fine on my Kali laptop and on another fresh AWS 20.04 instance.
All the permissions look fine and have not been touched from default - certainly on the AWS instance. I first noticed this yesterday on my home box and now see the same on one of the AWS instances.

Anybody seen anything similar or got hints on exactly what permissions to check?

On AWS ls -al /tmp shows
drwxrwxrwt 14 root root 4096 Jan 31 18:10 .

On my home box
drwxrwxrwt 27 root root 20480 Jan 31 18:12 .

Most frustrating as my script is now ready to run on a fresh AWS instance or other machine and will download client and node, connect to a (hardwired as yet) comnet and then install rust, vdash and monitor the node.

1 Like

I vaguely recollect seeing something similar before, but I was busy messing with my router at the time, so I thought I’d done something wrong myself.

2 Likes

Did it go away when you tried again?

I seem to vaguely remember seeing this before once. IIRC I put it down to a corrupted download, tried again and it was fine. However this problem is consistent on both machines now.

1 Like

It went away, and I’ve had no problems like that since.

I’m expecting my new router to arrive tomorrow or the day after. :slight_smile:

2 Likes

EDIT to above In both cases the temporary directory inside /tmp is created but is empty and has the expected permissions

drwx------ 2 willie willie 4096 Jan 31 18:41 tmp.WCPdn8Khs8

Now that I think about it, I may have entered the wrong address for the curl command when I saw the error.

/safe_network/main/
vs.
/safe_network/master/

Scripts don’t confuse “main” and “master”. That’s “human, all too human”. Just saying…

1 Like

Bump

Still getting this error when I run curl -so- https://raw.githubusercontent.com/maidsafe/safe_network/master/resources/scripts/install.sh | bash

ubuntu@ip-172-31-7-155:~$ curl -so- https://raw.githubusercontent.com/maidsafe/safe_network/master/resources/scripts/install.sh | bash
=> Downloading Safe CLI package from 'https://github.com/maidsafe/safe_network/releases/download/0.55.2-0.54.0-0.47.0/sn_cli-0.47.0-x86_64-unknown-linux-musl.tar.gz'...
=> Saving to '/tmp/tmp.gwipbUXMO0/sn_cli-0.47.0-x86_64-unknown-linux-musl.tar.gz'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   685  100   685    0     0   7074      0 --:--:-- --:--:-- --:--:--  7135
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file 
Warning: /tmp/tmp.gwipbUXMO0/sn_cli-0.47.0-x86_64-unknown-linux-musl.tar.gz: 
Warning: No such file or directory
  0 10.2M    0  1369    0     0   3618      0  0:49:38 --:--:--  0:49:38  5326
curl: (23) Failure writing output to destination
=> Unpacking Safe CLI to '/home/ubuntu/.safe/cli'...
tar (child): /tmp/tmp.gwipbUXMO0/sn_cli-0.47.0-x86_64-unknown-linux-musl.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
chmod: cannot access '/home/ubuntu/.safe/cli/safe': No such file or directory
=> Adding statement to '/home/ubuntu/.bashrc' profile to have Safe CLI binary path in the $PATH
=> Profile '/home/ubuntu/.bashrc' already contains a statement to set Safe CLI in the $PATH

Is anyone else seeing this?

If I change line 136 of safe_network/install.sh at main · maidsafe/safe_network · GitHub

to
tmp_dir=$HOME/tmp # tmp_dir=$(mktemp -d)

then it installs OK. $HOME/tmp has to exist first. I tried mkdir$HOME/tmp && tmp_dir=$HOME/tmp and it failed but its late…
Some weirdness around mktemp I am not understanding…

I filled issue install.sh fails to save Safe CLI package to tmp dir · Issue #994 · maidsafe/safe_network · GitHub and will think about it again in the morning

@Forester reported exactly the same problem when I was helping him last night off-channel

I have the same issue now?

when I run sudo which curl I get no result

when root which curl works

when user which curl works

but sudo which curl doesnt work and I think there lies the issue?

anyone has a concrete answer on this issue?

1 Like

just for giggles, try wget instead of curl.
what is the output of which curl when run as user?

I installed it with snapd so:
/snap/bin/curl

WorksForMe :slight_smile:

willie@gagarin:~$ curl -so- https://raw.githubusercontent.com/maidsafe/safe_network/master/resources/scripts/install.sh | bash
=> Downloading Safe CLI package from 'https://github.com/maidsafe/safe_network/releases/download/0.10.2-0.9.0-0.71.1-0.66.2-0.69.0-0.62.1/sn_cli-0.62.1-x86_64-unknown-linux-musl.tar.gz'...
=> Saving to '/tmp/tmp.R1ERHgBkV2/sn_cli-0.62.1-x86_64-unknown-linux-musl.tar.gz'...
  % 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  9.9M  100  9.9M    0     0  3413k      0  0:00:02  0:00:02 --:--:-- 4434k
=> Unpacking Safe CLI to '/home/willie/.safe/cli'...
=> Adding statement to '/home/willie/.bashrc' profile to have Safe CLI binary path in the $PATH
=> Profile '/home/willie/.bashrc' already contains a statement to set Safe CLI in the $PATH
willie@gagarin:~$ which curl
/usr/bin/curl

but I installed curl with apt, many many moons ago and its just been kept up to date

willie@gagarin:~$ curl -V
curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.12
Release-Date: 2022-01-05
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets zstd

ok will try uninstalling curl through snapd and then installing through apt! lets see!

2 Likes

works like a charm now! thanks Southside! so we finally got an answer, snapd curl is the issue, maybe if we put in sudoers path the snpad curl it would work but I dont want to complicate it!

2 Likes

TBH, I try to avoid snap.
Seems like there is just too much that could go wrong… like helicopters

I totally see the motivation behind it and am sympathetic to it but for me its like an automatic and a manual gearbox “Im a big boy now and I will decide what gear to use!”

Which is easy for me to say after many many years of getting used to the CLI and apt etc - a tool to help those less experienced is in general A Good Thing - in general…

2 Likes