Install script error

When I try to run the install script on s3 I get errors.

user@debian:~$ wget -qO- https://safe-api.s3.amazonaws.com/install.sh | bash
=> Downloading SAFE CLI package from ‘https://safe-api.s3.eu-west-2.amazonaws.com/safe-cli--x86_64-unknown-linux-gnu.tar.gz’…
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 312 0 312 0 0 348 0 --:–:-- --:–:-- --:–:-- 348
=> Unpacking SAFE CLI to ‘/home/user/.safe/cli’…
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
=> Adding statement to ‘/home/user/.bashrc’ profile to have SAFE CLI binary path in the $PATH
=> Profile ‘/home/user/.bashrc’ already contains a statement to set SAFE CLI in the $PATH

Is there an updated install script?

5 Likes

I am not sure, but that looks like corruption, possibly in downloading. It’s not out of date as much as corrupt there I think. Ah, no I just tried, the file seems corrupt there on s3. We will get that updated this week ( ping @StephenC )

4 Likes

Just download “sn_cli” (safe*) and “sn_browser” (safe_browser*) and you should be fine.



* sn_xxx are Maidsafe’s renames, but they forgot to release new versions with them.

4 Likes

Thanks folaht. I followed install instructions from https://github.com/maidsafe/sn_api/tree/master/sn_cli

But there is an error in the install script i guess. Your recommending I just try to build from source? When I did that I got “safe node install” errors. Not sure what I did wrong. Will wait for updated install script.

Download and extract (for linux as per your error):
https://github.com/maidsafe/sn_api/releases/download/v0.15.0/safe-cli-0.15.0-x86_64-unknown-linux-gnu.tar.gz

In terminal do to open CLI:

./safe

Now you can install all requirements easily while in the safe cli interactive mode, run:

update
auth install
auth update
vault install
vault update
networks add mylocalnetwork
networks switch mylocalnetwork
vault run-baby-fleming
auth start
auth create-acc --test-coins
auth login --self-auth
auth status

Now you should have all requirements installed, the safe-auth and safe-vault.
Make sure you run the safe-auth last because you need to set up your own local network first before it can authorize something. Also, don’t forget to use --test-coins with create-acc because you will not have any coins to create an account. Finally, auth login --self-auth is important so that you can run apps with ease without needing to approve them, this can often cause trouble!

After you run vault run-baby-fleming you have to wait for the vault to be done working in the background (you can see the CPU drop to idle) and then use files put ./WebsiteFolder/ --recursive to get it uploaded.
You should be able to open the safe-browser and go to your website XOR-URL and view it from there if I’m correct.

After the PUT you will receive an XOR-URL to the file container like 'safe://ahg8hg0sjhni3otsgblablablabla'. You can either go to that URL in the safe-browser OR you try to get a decent NRS name with:
nrs create mywebsite --xorurl 'safe://ahg8hg0sjhni3otsgblablablabla'.

5 Likes

All you need is the safe executable, put it at ~/.safe/cli

then run this command:

echo "export PATH=\$PATH:$HOME/.safe/cli" | tee -a .bashrc

and reopen the terminal.

I also recommend putting the browser AppImage at ~/.safe/browser.

You can then follow DeusNexus’ instructions with:

safe

Also…

```
Put your code between six backticks like this.
```
```python
And you can even choose computer language syntax like ‘python’ for example.
I think standard is javascript, but I could be wrong.
```
```plain
There’s also the plain option, which I use for showing bash commands or error messages.
```

2 Likes

Hi @elephantcoin, there is actually an updated install script tracked in GitHub here BUT I just noticed when testing before sending this that there’s an issue where the tag version number of the releases it downloads now contain a v, e.g. v0.15.0 - until very recently tags were just 0.15.0, so actually that script would have failed anyway.

I’ve uploaded a working script to a new bucket location on S3:

Note that the current CLI user guide actually points to this new S3 bucket (sn-api), not the S3 bucket with an outdated name (safe-api) that you link to in the OP. I assume you got that old link somewhere - let me know where and I’ll update (maybe somewhere on this forum?)
We had deliberately not publicised the new script just yet as we are currently working on a new version of the CLI, authd, etc, that would be compatible with the ongoing/recent refactoring across many of our crates.

I’ll PR the minor change to the GitHub version of the script to take account of the new v in tags (just the addition of a sed command to strip out the v from the version field).

Some extra info…
As alluded to by the folks who jumped in to help above (thanks @folaht and @DeusNexus), there has been fairly vast renaming and refactoring since we last did a release across the board (api, cli, authd, browser, etc) so if you want to see things working together then the install script I’ve updated for you above will install v0.15.0 of the CLI, after that you should follow the instructions from an old version of the CLI readme, say from the v0.15.0 tag here as that has all the correct commands for that version, e.g. safe vault install instead of the new safe node install.
I’m not sure if you’ll hit other issues due to the renaming across the board when you proceed further with this, we’ve really put this to the side and put all efforts into getting out a v0.16.0 and everything that needs to accompany it - ping in here and we’ll do our best to support you if you do need further support.

5 Likes

Finish it already!!!



*takes deep sigh*
Sorry about that, people are getting tired of waiting.

2 Likes

:joy: I know I know, I understand your impatience.

I assure you we’re working flat out to reach that goal, as you’ll see from the weekly dev updates. If it was quick & easy then it would already be done, by us or by others :slightly_smiling_face:

9 Likes

Bump - bumpity bump bumo