Installing AWS CLI v2 on Raspberry Pi 4B with Raspbian OS

0

Is it possible to install AWS CLI v2 on a Raspberry Pi 4B? I am on Raspbian OS.

I tried going through the steps here and here, but was unable to install AWS CLI v2 on a Raspberry Pi:

curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Error message as follows:

./aws/install: 78: ./aws/install: /home/pi/aws/dist/aws: Exec format error
Found preexisting AWS CLI installation: /usr/local/aws-cli/v2/current. Please rerun install script with --update flag.

I finally succeeded with the first option in the instructions here (via git clone https://github.com/aws/aws-cli.git) and installing the dependencies (CMake and Rust), but when I run aws --version I get the following error:

ImportError: cannot import name 'register_dynamodb_paginator_fix' from 'awscli.customizations.dynamodb' (/home/pi/.local/lib/python3.8/site-packages/awscli/customizations/dynamodb/__init__.py)
AWS
질문됨 2년 전3805회 조회
1개 답변
2
수락된 답변

Hello,

It looks like you have multiple versions of the AWS CLI installed per your original error message. I recommend uninstalling the older version located in /usr/local/aws-cli/v2/current.

I followed the instructions you gave and was able to install the AWS CLI on a Raspberry Pi 4B with no error messages. Logs below for reference. This was a brand new install of Raspbian OS.

curl -O 'https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip'
unzip awscli-exe-linux-aarch64.zip
root@kube-worker1:/home/pi# sudo ./aws/install
You can now run: /usr/local/bin/aws --version
root@kube-worker1:/home/pi# /usr/local/bin/aws --version
aws-cli/2.7.22 Python/3.9.11 Linux/5.10.63-v8+ exe/aarch64.debian.11 prompt/off
profile pictureAWS
전문가
Chris_G
답변함 2년 전
  • At the install step, I get an "Exec format error":

    pi@raspberrypi:~$ curl -O 'https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip'
    pi@raspberrypi:~$ unzip awscli-exe-linux-aarch64.zip
    pi@raspberrypi:~$ sudo ./aws/install
    ./aws/install: 78: ./aws/install: /home/pi/aws/dist/aws: Exec format error
    You can now run: /usr/local/bin/aws --version
    
  • @Nathanial that's odd considering an Exec format error means the operating system is not compatible. Are you running on 32bit RaspbianOS or 64bit? This AWS CLI package is only compatible with the 64bit OS. Can you check your OS version using uname -a?

    root@kube-worker1:~# uname -m
    aarch64
  • Okay, got it. I realize I am on a 32-bit Raspbian OS, and perhaps I should switch to a 64-bit OS:

    pi@raspberrypi:~$ uname -m
    armv7l
    

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠