SanMig
December 22, 2020, 8:26pm
1
Followed the guidelines on github in order to build Safe CLI using rustup. Im having difficulty using the safe base command, however, can use cargo commands.
I assume that I am in the correct dir of the safe executable file was built by default. TL-WA850RE:sn_api kanenelson$
Tried to execute a dry run using the safe base command and Im returned with: -bash: safe: command not found
Any idea or help, please? TIA
3 Likes
Assuming Linux,
If you are in the directory in the safe command resides, try ./safe to tell the computer to look in the current directory.
To investigate further look at the output of which safe
If you get no output then your newly compiled safe binary is not in any directory listed in your PATH variable.
3 Likes
SanMig
December 22, 2020, 8:46pm
3
Running Unix MacOS. It appears Im not in the directory when trying ./safe
No output is given so I need to configure the PATH variable?
2 Likes
I know little of MacOS, but its basically BSD Unix so very similar to Linux. I think I am reasonably safe in giving these hints.
Where is your safe binary?
Try export PATH=$PATH:
Note that is a colon : after $PATH
Let us know how you get on.
Remember the only stupid questions are the one the you didn’t ask and “Would you like another beer?”
2 Likes
Oh sorry line 2 should read
Try export PATH=$PATH:insert the full path to your safe binary
I keep forgetting that trying to quote < and > in replies on the forum usually fails cos it confuses the formatting
SanMig
December 22, 2020, 9:14pm
6
So I assume my binary file is located ~/.safe/cli/ where the cli folder appears to be empty.
I ran export PATH=$PATH: successfully with no error but nothing returned.
I haven’t used a command line for a number of years so forgive me as brush up.
1 Like
bochaco
December 22, 2020, 9:16pm
7
Can you please check the output you get when installing with the following command and share any error you see?:
curl -so- https://sn-api.s3.amazonaws.com/install.sh | bash
Yes that was my fault – the advice looked good as I typed it but it missed out the important bit - the extra directory needed to add to the path
but check what @bochaco had to say first.
Miguelo
December 22, 2020, 11:51pm
9
I got this error
Unpacking Safe CLI to '/Users/<username>/.safe/cli'...
tar: Error opening archive: Unrecognized archive format
For some reason install script doesn’t load the cli package. Maybe missing version number from url:
=> Downloading Safe CLI package from 'https://sn-api.s3.eu-west-2.amazonaws.com/sn_cli--x86_64-apple-darwin.tar.gz'...
You can download working cli from Maidsafe git repo here: https://github.com/maidsafe/sn_api/releases/download/v0.16.0/sn_cli-0.16.0-x86_64-apple-darwin.tar.gz and extract it to /Users/<username>/.safe/cli
. After that those safe commands should work.
Also, you might need to open safe executable in cli folder with Finder first time because Mac security features.
3 Likes
SanMig
December 23, 2020, 9:02am
10
This was returned:
Error opening archive: Unrecognized archive format
Thanks for the command @bochaco
@Miguelo I managed to launch the cli shell
2 Likes
Just tested and there does indeed appear to be an issue with the version grep in the install script on macOS - well spotted.
Leave it with me
4 Likes
New install script with updated grep
& sed
commands, which also work on macOS, now uploaded to S3.
curl -so- https://sn-api.s3.amazonaws.com/install.sh | bash
Should work on macOS now
6 Likes
system
Closed
February 20, 2021, 8:26pm
13
This topic was automatically closed after 60 days. New replies are no longer allowed.