vscode-codeql-starter icon indicating copy to clipboard operation
vscode-codeql-starter copied to clipboard

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

Open trganda opened this issue 8 months ago • 1 comments

When open the dev container on arm machine, e.g. M1 chip mac, the following error will happen in CodeQL Extension Log

Resolving RAM settings using CodeQL CLI: resolve ram -v --log-to-stderr --format json --ram 2048...
Failed to run 'codeql version'. Reason: Checking CodeQL version failed: OrbStack ERROR: Dynamic loader not found: /lib64/ld-linux-x86-64.so.2

This usually means that you're running an x86 program on an arm64 OS without multi-arch libraries.
To fix this, you can:
  1. Use an Intel (amd64) container to run this program; or
  2. Install multi-arch libraries in this container.

This can also be caused by running a glibc executable in a musl distro (e.g. Alpine), or vice versa.

It can be fix by install an amd64 architecture libc6 package. I have added a oncreate.sh for devcontainer.json on onCreateCommand field.

trganda avatar Jun 24 '24 09:06 trganda