- Newest
- Most votes
- Most comments
Hello,
You can install AWS CLI v2 on raspberry pi 4 model b+ with Raspbian OS for ARM64.
The error "/usr/local/bin/aws: No such file or directory" usually indicates that the AWS CLI binary is not installed or not in the expected location. Please refer the following steps to troubleshoot the issue.
-
Uninstall AWS CLI and re-install it again
=> Please refer the article Uninstalling the AWS CLI version 2 to uninstall the CLI
=> Re-install the AWS CLI: Installing or updating the latest version of the AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip " -o "awscliv2.zip "
unzip awscliv2.zip
sudo ./aws/install -i /usr/local/aws-cli -b /usr/local/bin
- If AWS CLI is installed but not in the expected location, you can check where it is installed by running the following command:
$ which aws
This will give you the path where AWS CLI is installed. If it is not installed in "/usr/local/bin/aws", you may need to update your environment variables to point to the current location.
- If you have updated your environment variables, and are still experiencing the error, you can try adding the path to the AWS CLI binary to your PATH variable as follows:
Syntax:
export PATH=/path/to/awscli/bin:$PATH #Replace /path/to/awscli/bin with the actual path to the AWS CLI binary
Example:
$ sudo export PATH=/usr/local/bin:$PATH
Let me know if you have any further queries. Thank you for your interest in re:Post community.
Best Regards, Ashish
Refer Re:Post Installing AWS CLI v2 on Raspberry Pi 4B with Raspbian OS
Hello, Ashish.
Thank you for your quick feedback above !
According to your above procedure, I uninstall and re-install AWS CLI but detected same error "Not such file or directory".
In addition, regarding the path to the AWS CLI binary, it looks like adding the path which AWS CLI is installed correctly.
For further analysis, I wrote a series of steps as follow.
pi@rapsberrypi4:~ $ sudo ./aws/install -i /usr/local/aws-cli -b /usr/local/bin
./aws/install: 78: ./aws/install: /home/pi/aws/dist/aws: not found
You can now run: /usr/local/bin/aws --version
pi@rapsberrypi4:~ $ which aws
/usr/local/bin/aws
pi@rapsberrypi4:~ $ echo $PATH
/home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
pi@rapsberrypi4koba:~ $ aws --version
bash: /usr/local/bin/aws: Not such file or directory
After that, I checked directory to install AWS CLI binary and it appears that there is "aws" in ../dist/aws
as follow.
But this aws
failed to run.
pi@rapsberrypi4:~ $ ls /usr/local/bin -la
...
lrwxrwxrwx 1 root root 37 4月 4 22:27 aws -> /usr/local/aws-cli/v2/current/bin/aws
lrwxrwxrwx 1 root root 47 4月 4 22:27 aws_completer -> /usr/local/aws-cli/v2/current/bin/aws_completer
pi@rapsberrypi4:/usr/local/aws-cli/v2/current/bin $ ls -la
lrwxrwxrwx 1 root root 11 4月 4 22:27 aws -> ../dist/aws
lrwxrwxrwx 1 root root 21 4月 4 22:27 aws_completer -> ../dist/aws_completer
pi@rapsberrypi4:/usr/local/aws-cli/v2/current/bin$ cd ../dist/
pi@rapsberrypi4:/usr/local/aws-cli/v2/current/dist$ ls -la
...
-rwxr-xr-x 1 root root 6636240 4月 5 21:01 aws
I did above procedure twice. But the result was same.
Relevant content
- Accepted Answerasked 2 years ago
- asked 10 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 19 days ago
- AWS OFFICIALUpdated 7 months ago