% aws --version
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2':
No such file or directory
If you have installed AWS CLI on the Ubuntu docker image on your M1/M2 Mac and are trying to run the aws commands and you get the above error, then the reason could be that the underlying Ubuntu image will be an ARM one and not x86-64 one.
Solution 1:Download the AWS CLI2 for ARM Linux and get it installed.
Download awscli (AWS LINK: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html$ curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
Solution 2:
While running your docker image for Ubuntu set the --platform option as linux/x86_64
|CBS|BASH|% docker run --platform linux/x86_64 ubuntu![Fix - Docker Ubuntu Could not open linux-x86-64-so.2 Fix - Docker Ubuntu Could not open linux-x86-64-so.2](https://code2care.org/docker/docker-m1-m2-mac-qemu-x86_64-could-not-open-lib64-linux-so-2-no-such-file-or-directory-aws-cli/images/Fix - Docker Ubuntu Could not open linux-x86-64-so.2.png)
Fix - Docker Ubuntu Could not open linux-x86-64-so.2
More Posts related to Docker,
- Install Docker on Mac using brew cask
- How to know the Docker Sandbox ID of a Container Network?
- How to Rename Docker Image with none TAG and REPOSITORY?
- How to know list of images available on your device
- Docker Alpine Linux and Apache2 Example
- Install Bash on Alpine Linux - Docker
- Docker Run Command Examples - Part 1
- Install the minimal Linux on Docker (only 5 mb Alpine Linux)
- [fix] docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory.
- Install RabbitMQ on Docker
- How to know docker Engine details
- [Fix] Docker Error response from daemon: manifest for :latest not found: manifest unknown
- How to stop and start a docker container
- How to create volume in Docker using Command
- How to know the Docker Engine Version
- [docker] Error response from daemon: No such container
- Install Docker for Mac using Home-brew Cask
- Docker - Incompatible CPU detected - M1/M2 Mac (macOS Sonoma)
- [fix] Docker Desktop App not starting on Mac (macOS)
- Unable to find image docker latest locally
- How to Stop/Cancel/kill docker image pull
- List of what's new in Docker 4.23
- [Docker M1/M2 Mac] qemu-x86_64: Could not open /lib64/ld-linux-x86-64.so.2: No such file or directory AWS CLI
- Install Docker Desktop on M1/M2 Apple Silicon ARM Chip Mac
- Docker - Running in Resource Saver mode
More Posts:
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console - Java
- Java 8: Get First and Last Date of the Week for Given Date - Java
- How to take a screenshot on Microsoft Windows OS on PC or Laptop - Microsoft
- How to Enable StandBy Mode on iPhone with iOS 17 - iOS
- How to add Conda Environment To Jupyter Notebook - Python
- [fix] java: incompatible types: double cannot be converted to java.lang.Integer Generics - Java
- fix fatal: --local can only be used inside a git repository error - Git
- How to Compare two Files in Bash Shell - Bash