Reputation: 61
Is there anybody to try to put aws-cliv2 into raspberry pi? I've got an err msg below which expresses an exec format error.
[my env] (uname on my Raspberry Pi3) Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu XXX XX XX:XX:XX GMT 2020 armv7l GNU/Linux
[err msg] pi@raspberrypi:~/XX/cdkContainer $ sudo ./aws/install ./aws/install: 78: ./aws/install: /XX/cdkContainer/aws/dist/aws: Exec format error You can now run: /usr/local/bin/aws --version
pi@raspberrypi:~/XX/cdkContainer $ aws --version bash: /usr/local/bin/aws: cannot execute binary file: Exec format error
I've just referred to an aws doc on the web site: However, It doesn't work on my Raspberry Pi 3.
Upvotes: 6
Views: 19436
Reputation: 11
Had the problem on Raspberry 5.0 when installing AWS CLI v2: "aws: Exec format error". It was solved with the help of snap. On a Raspberry Pi running the latest version of Raspbian snap can be installed directly from the command line:
$ sudo apt update
$ sudo apt install snapd
Reboot your device:
$sudo reboot
Install the core snap in order to get the latest snapd:
$ sudo snap install core
Install aws-cli v2:
$ sudo snap install aws-cli --classic
Upvotes: 1
Reputation: 3914
For those comming with a newly installed WSL
Linux Ubuntu, you need to install pip
python module and then install awscli
:
sudo apt install python3-pip
pip install awscli
Then add the installed bin in your PATH
(replace <MY_USER>
with yours) :
zsh :
echo "export PATH=$PATH:/home/<MY_USER>/.local/bin" >> ~/.zshrc
bash :
echo "export PATH=$PATH:/home/<MY_USER>/.local/bin" >> ~/.bashrc
Finally check everything is good :
➜ aws --version
aws-cli/1.29.8 Python/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2 botocore/1.31.8
Upvotes: 0
Reputation: 1
The issue you are facing I think as others mentioned is that you are perhaps running the 64-bit aws-cli version. I ran into this issue on my linux machine running an arm processor. The easiest solution was installing the linux arm version instead (see: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
If you already have a 64-bit version installed, you can just delete the 64-bit file, download the arm version and re-run the installation with an update flag:
sudo ./aws/install --update
Hope this helps anyone.
Upvotes: 0
Reputation: 433
aws-cli v2 only supports 64-bit ARM, and your Raspberry Pi is presumably 32-bit, so it looks like what you're asking is simply impossible. The older aws-cli v1 does support Raspberry Pi though.
There is an open issue on Github where a dev confirmed the issue, but they currently have no fix planned.
Upvotes: 0
Reputation: 2765
Same here..AWS Cli 2.0 docu page reports ARM, but only for 64 bit architecture, so you cannot use in raspbian. The only solution I found is to install aws-cli version 1 using pip.
python3 -m pip install aws-cli
Everything works.
Upvotes: 8