Qemu
如何在 Debian 上為 qemu 使用者模式獲取 aarch64 版本的 musl
我在 Linux v1 (WSL) 的 Windows 子系統上執行 Kali Linux。如果這意味著什麼,這在 WSL v2 上也失敗了。我有一個要執行的 ARM aarch64 二進製文件。我有 qemu 使用者模式,我嘗試執行它,
qemu-aarch64 -L /usr/aarch64-linux-gnu/ binary_name
但我得到了錯誤/lib/ld-musl-aarch64.so.1: No such file or directory
我已經安裝了軟體包
sudo apt-get install install gcc-arm-linux-gnueabihf libc6-dev-armhf-cross qemu-user-static libc6-dev-arm64-cross gcc-aarch64-linux-gnu
我還需要什麼才能
musl
在我的 Debian 系統上獲取 ARM64 庫?抱歉,如果我問錯了問題,我對 qemu 使用者模式真的很陌生。
編輯:
$ 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
您需要啟用
arm64
架構:sudo dpkg --add-architecture arm64
然後更新包索引:
sudo apt update
更新成功完成後(在您的編輯中並非如此),您將能夠安裝
musl
:arm64
sudo apt install musl:arm64