0

I'm running Kali Linux on a Windows Subsystem for Linux v1 (WSL). This failed on WSL v2 as well if that means anything. I have an ARM aarch64 binary I want to run. I have qemu user mode and I try running it with qemu-aarch64 -L /usr/aarch64-linux-gnu/ binary_name but I get the error

/lib/ld-musl-aarch64.so.1: No such file or directory

I've installed the packages

sudo apt-get install install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static libc6-dev-arm64-cross gcc-aarch64-linux-gnu

what else do I need to get the ARM64 musl library on my Debian system?

Sorry if I'm asking the wrong question, I'm really new to qemu user mode.

EDIT:

$ dpkg --print-foreign-architectures
arm64
$ sudo apt update
Hit:2 https://download.sublimetext.com apt/stable/ InRelease
Hit:1 http://kali.download/kali kali-rolling InRelease
Get:3 http://kali.download/kali kali-rolling/main arm64 Packages [16.7 MB]
Ign:3 http://kali.download/kali kali-rolling/main arm64 Packages
Get:4 http://kali.download/kali kali-rolling/non-free arm64 Packages [143 kB]
Get:4 http://kali.download/kali kali-rolling/non-free arm64 Packages [143 kB]
Ign:4 http://kali.download/kali kali-rolling/non-free arm64 Packages
Ign:3 http://http.kali.org/kali kali-rolling/main arm64 Packages
Ign:4 http://http.kali.org/kali kali-rolling/non-free arm64 Packages
Err:3 http://http.kali.org/kali kali-rolling/main arm64 Packages
  File has unexpected size (16750562 != 16747652). Mirror sync in progress? [IP: <IP>]
18% [Working]E: Transaction http://http.kali.org/kali/dists/kali-rolling/InRelease was already aborted and is aborted again
Err:4 http://http.kali.org/kali kali-rolling/non-free arm64 Packages
  File has unexpected size (143487 != 143485). Mirror sync in progress? [IP: <IP>]
Reading package lists... Done
E: Transaction http://http.kali.org/kali/dists/kali-rolling/InRelease was already aborted and is aborted again
$ sudo apt install musl_arm64
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package musl_arm64
0

You need to enable the arm64 architecture:

sudo dpkg --add-architecture arm64

Then update the package indexes:

sudo apt update

Once the update completes successfully (which isn’t the case in your edit), you’ll be able to install musl for arm64:

sudo apt install musl:arm64
12
  • I tried to do this but it says Unable to locate package musl:arm64 – Revoltechs Nov 12 '20 at 12:56
  • Even after dpkg --add-architecture arm64 and apt update? – Stephen Kitt Nov 12 '20 at 13:02
  • Yes, I'm not sure if musl is the exact name of the package on ARM64. I know the missing link object in the error message appears to be from musl but I'm not sure where to get the ARM64 version. – Revoltechs Nov 12 '20 at 13:04
  • The package is musl, and has been since Debian 8. I’m using this solution on my own system to run MUSL Aarch64 binaries using QEMU. I’m not sure why apt can’t find musl:arm64 on your system... – Stephen Kitt Nov 12 '20 at 13:05
  • 1
    Ah, so apt update failed, you need a successful apt update; without that, apt install musl:arm64 won’t work. – Stephen Kitt Nov 12 '20 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.