Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sam-cli ==> qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory #5

Closed
nick-youngblut opened this issue Jun 2, 2023 · 5 comments
Labels

Comments

@nick-youngblut
Copy link

Docker file:

{
	"name": "Ubuntu",
	"image": "mcr.microsoft.com/devcontainers/base:jammy",
	"postCreateCommand": "bash .devcontainer/setup.sh",
    "customizations": {
        "vscode": {
            "extensions": [
                "GitHub.copilot",
                "eamodio.gitlens"
            ]
        }
	},
	"features": {
		"ghcr.io/devcontainers/features/docker-in-docker:2": {
			"version": "latest"
		},
		"ghcr.io/devcontainers/features/aws-cli:1": {
			"version": "latest"
		},
		"ghcr.io/customink/codespaces-features/sam-cli:1": {
			"version": "latest"
		},
		"ghcr.io/withfig/features/fig:1": {
			"version": "latest"
		},
		"ghcr.io/mamba-org/devcontainer-features/micromamba:1": {
			"version": "latest",
			"channels": "conda-forge,bioconda"
		},
		"ghcr.io/devcontainers-contrib/features/wget-apt-get:1": {			
		}
	}
}

After the container build:

sam -h
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

Machine: M2 macbook air; macOS 12.6.3

ghcr.io/customink/codespaces-features/sam-cli is not installing an executable compatible with the M2 chip.

@metaskills
Copy link
Contributor

Sorry... I should add a platform warning for this one. I learned that SAM CLI does not have an easy arm64 download like the AWS CLI does. Details here:

What I have been doing till they address this is to install SAM via the .devcontainer/Dockerfile like so: This ensures a platform agnostic intsall and works for x86_64 and arm64.

RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1
RUN apt-get install -y pip && pip install aws-sam-cli

@nick-youngblut
Copy link
Author

nick-youngblut commented Jun 4, 2023

Thanks @metaskills for the explanation. I'm currently installing via pip in my setup.sh script:

pip install --upgrade aws-sam-cli

My devcontainer.json:

{
    "name": "Ubuntu",
    "image": "mcr.microsoft.com/devcontainers/base:jammy",
    "postCreateCommand": "bash .devcontainer/setup.sh",
    "customizations": {
        "vscode": {
            "extensions": [
                "GitHub.copilot",
                "eamodio.gitlens",
                "codezombiech.gitignore",
                "ms-python.python",
                "Gruntfuggly.todo-tree",
                "ms-azuretools.vscode-docker",
                "ms-vscode-remote.remote-ssh"
            ]
        }
	},
	"features": {
		"ghcr.io/devcontainers/features/docker-in-docker:2": {
			"version": "latest"
		},
		"ghcr.io/devcontainers/features/aws-cli:1": {
			"version": "latest"
		},
		"ghcr.io/mamba-org/devcontainer-features/micromamba:1": {
			"version": "latest",
			"channels": "conda-forge bioconda defaults",
			"packages": "python=3.9 pip"
		}
	}
}

@EloB EloB mentioned this issue Dec 13, 2023
12 tasks
@EloB
Copy link
Contributor

EloB commented Dec 13, 2023

I made this PR #6. I think it works as intended. I don't have a non aarch64 device. Can I get some help trying to validate that works as well?

Haven't updated such features for VSCode so I might have misunderstood what needs to be done.

When I ran it worked for me on a MacBook Pro M2.

./bin/test
./bin/console \
  public.ecr.aws/sam/build-nodejs16.x
bash-4.2# sam --version
SAM CLI, version 1.105.0

I'm not sure if it's enough. Gladly taking feedback.

@EloB
Copy link
Contributor

EloB commented Dec 14, 2023

@metaskills what's your thoughts?

@EloB
Copy link
Contributor

EloB commented Jan 10, 2024

Do you have any estimate when you might have time for this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants