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

fix: /lib64/ld-linux-x86-64.so.2 not found on arm64 container #216

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"github.vscode-codeql",
"slevesque.vscode-zipexplorer"
],
"onCreateCommand": ".devcontainer/oncreate.sh",
"postCreateCommand": "git submodule init && git submodule update --recursive",
"settings": {
"codeQL.runningQueries.memory": 2048
Expand Down
26 changes: 26 additions & 0 deletions .devcontainer/oncreate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

UBUNTU_CODENAME=$(lsb_release -c -s)
echo $UBUNTU_CODENAME

arch="$(dpkg --print-architecture)"
if [ "$arch" = "arm64" ]; then
# Add architecture amd64
sudo dpkg --add-architecture amd64

echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME} main restricted
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME}-updates main restricted
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME} universe
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME}-updates universe
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME} multiverse
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME}-updates multiverse
deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu ${UBUNTU_CODENAME}-backports main restricted universe multiverse" \
| sudo tee /etc/apt/sources.list.d/cross-source.list

# Add default architecture to sources.list, otherwise the 'apt update' command will occurs error
sudo sed -i "s/deb/deb [arch=$arch]/g" /etc/apt/sources.list

# Install libc6:amd64
sudo apt update
sudo apt install libc6:amd64 -y
fi