You are not logged in.

#1 2024-09-29 22:23:50

MetalInMyVeins
Member
Registered: 2024-02-03
Posts: 27

Could not open '/lib/ld-linux-aarch64.so.1'

I have qemu and aarch64-linux-gnu-gcc installed in my system. I can compile programs with aarch64-linux-gnu-gcc. But when I try to emulate the binary using qemu, I get this:

qemu-aarch64: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory

So ld-linux-aarch64.so.1 is not available in my system. Why? How can I fix it? I can compile using the -static flag and it works then. But that's not what I wanna do.

Last edited by MetalInMyVeins (2024-09-29 22:25:53)

Offline

#2 2024-09-30 05:14:51

Funny0facer
Member
From: Germany
Registered: 2022-12-03
Posts: 157

Re: Could not open '/lib/ld-linux-aarch64.so.1'

Please post the output of "sudo pacman -Qs qemu"

Offline

#3 2024-09-30 05:34:22

MetalInMyVeins
Member
Registered: 2024-02-03
Posts: 27

Re: Could not open '/lib/ld-linux-aarch64.so.1'

Funny0facer wrote:

Please post the output of "sudo pacman -Qs qemu"

Here:

local/qemu-audio-alsa 9.1.0-2
    QEMU ALSA audio driver
local/qemu-audio-dbus 9.1.0-2
    QEMU D-Bus audio driver
local/qemu-audio-jack 9.1.0-2
    QEMU JACK audio driver
local/qemu-audio-oss 9.1.0-2
    QEMU OSS audio driver
local/qemu-audio-pa 9.1.0-2
    QEMU PulseAudio audio driver
local/qemu-audio-pipewire 9.1.0-2
    QEMU PipeWire audio driver
local/qemu-audio-sdl 9.1.0-2
    QEMU SDL audio driver
local/qemu-audio-spice 9.1.0-2
    QEMU spice audio driver
local/qemu-base 9.1.0-2
    A basic QEMU setup for headless environments
local/qemu-block-curl 9.1.0-2
    QEMU curl block driver
local/qemu-block-dmg 9.1.0-2
    QEMU DMG block driver
local/qemu-block-gluster 9.1.0-2
    QEMU Gluster block driver
local/qemu-block-iscsi 9.1.0-2
    QEMU iSCSI block driver
local/qemu-block-nfs 9.1.0-2
    QEMU NFS block driver
local/qemu-block-ssh 9.1.0-2
    QEMU SSH block driver
local/qemu-chardev-baum 9.1.0-2
    QEMU Baum chardev driver
local/qemu-chardev-spice 9.1.0-2
    QEMU spice chardev driver
local/qemu-common 9.1.0-2
    A generic and open source machine emulator and virtualizer
local/qemu-desktop 9.1.0-2
    A QEMU setup for desktop environments
local/qemu-docs 9.1.0-2
    A generic and open source machine emulator and virtualizer - documentation
local/qemu-emulators-full 9.1.0-2
    All QEMU user mode and system emulators
local/qemu-full 9.1.0-2
    A full QEMU setup
local/qemu-hw-display-qxl 9.1.0-2
    QEMU QXL display device
local/qemu-hw-display-virtio-gpu 9.1.0-2
    QEMU virtio-gpu display device
local/qemu-hw-display-virtio-gpu-gl 9.1.0-2
    QEMU virtio-gpu-gl display device
local/qemu-hw-display-virtio-gpu-pci 9.1.0-2
    QEMU virtio-gpu-pci display device
local/qemu-hw-display-virtio-gpu-pci-gl 9.1.0-2
    QEMU virtio-gpu-pci-gl display device
local/qemu-hw-display-virtio-vga 9.1.0-2
    QEMU virtio-vga display device
local/qemu-hw-display-virtio-vga-gl 9.1.0-2
    QEMU virtio-vga-gl display device
local/qemu-hw-s390x-virtio-gpu-ccw 9.1.0-2
    QEMU s390x-virtio-gpu-ccw display device
local/qemu-hw-usb-host 9.1.0-2
    QEMU USB host device
local/qemu-hw-usb-redirect 9.1.0-2
    QEMU usbredir device
local/qemu-hw-usb-smartcard 9.1.0-2
    QEMU USB smartcard device
local/qemu-img 9.1.0-2
    QEMU tooling for manipulating disk images
local/qemu-pr-helper 9.1.0-2
    QEMU persistent reservation utility
local/qemu-system-aarch64 9.1.0-2
    QEMU system emulator for AARCH64
local/qemu-system-alpha 9.1.0-2
    QEMU system emulator for Alpha
local/qemu-system-alpha-firmware 9.1.0-2
    Firmware for QEMU system emulator for Alpha
local/qemu-system-arm 9.1.0-2
    QEMU system emulator for ARM
local/qemu-system-arm-firmware 9.1.0-2
    Firmware for QEMU system emulator for ARM
local/qemu-system-avr 9.1.0-2
    QEMU system emulator for AVR
local/qemu-system-cris 9.1.0-2
    QEMU system emulator for CRIS
local/qemu-system-hppa 9.1.0-2
    QEMU system emulator for HPPA
local/qemu-system-hppa-firmware 9.1.0-2
    Firmware for QEMU system emulator for HPPA
local/qemu-system-loongarch64 9.1.0-2
    QEMU system emulator for LoongArch64
local/qemu-system-m68k 9.1.0-2
    QEMU system emulator for ColdFire (m68k)
local/qemu-system-microblaze 9.1.0-2
    QEMU system emulator for Microblaze
local/qemu-system-microblaze-firmware 9.1.0-2
    Firmware for QEMU system emulator for Microblaze
local/qemu-system-mips 9.1.0-2
    QEMU system emulator for MIPS
local/qemu-system-or1k 9.1.0-2
    QEMU system emulator for OpenRisc32
local/qemu-system-ppc 9.1.0-2
    QEMU system emulator for PPC
local/qemu-system-ppc-firmware 9.1.0-2
    Firmware for QEMU system emulator for PPC
local/qemu-system-riscv 9.1.0-2
    QEMU system emulator for RISC-V
local/qemu-system-riscv-firmware 9.1.0-2
    Firmware for QEMU system emulator for RISC-V
local/qemu-system-rx 9.1.0-2
    QEMU system emulator for RX
local/qemu-system-s390x 9.1.0-2
    QEMU system emulator for S390
local/qemu-system-s390x-firmware 9.1.0-2
    Firmware for QEMU system emulator for S390
local/qemu-system-sh4 9.1.0-2
    QEMU system emulator for SH4
local/qemu-system-sparc 9.1.0-2
    QEMU system emulator for SPARC
local/qemu-system-sparc-firmware 9.1.0-2
    Firmware for QEMU system emulator for SPARC
local/qemu-system-tricore 9.1.0-2
    QEMU system emulator for tricore
local/qemu-system-x86 9.1.0-2
    QEMU system emulator for x86
local/qemu-system-x86-firmware 9.1.0-2
    Firmware for QEMU system emulator for x86
local/qemu-system-xtensa 9.1.0-2
    QEMU system emulator for Xtensa
local/qemu-tests 9.1.0-2
    QEMU tests
local/qemu-tools 9.1.0-2
    QEMU tools
local/qemu-ui-curses 9.1.0-2
    QEMU curses UI driver
local/qemu-ui-dbus 9.1.0-2
    QEMU D-Bus UI driver
local/qemu-ui-egl-headless 9.1.0-2
    QEMU EGL headless UI driver
local/qemu-ui-gtk 9.1.0-2
    QEMU GTK UI driver
local/qemu-ui-opengl 9.1.0-2
    QEMU OpenGL UI driver
local/qemu-ui-sdl 9.1.0-2
    QEMU SDL UI driver
local/qemu-ui-spice-app 9.1.0-2
    QEMU spice app UI driver
local/qemu-ui-spice-core 9.1.0-2
    QEMU spice core UI driver
local/qemu-user 9.1.0-2
    QEMU user mode emulation
local/qemu-vhost-user-gpu 9.1.0-2
    QEMU vhost-user-gpu display device
local/qemu-vmsr-helper 9.1.0-2
    QEMU persistent reservation utility
local/vde2 2.3.3-5
    Virtual Distributed Ethernet for emulators like qemu

Also, the dependency list of aarch64-linux-gnu-gcc doesn't include ld-linux-aarch64.so.1 as a dependency:
https://archlinux.org/packages/extra/x8 … x-gnu-gcc/
No wonder it's not in my system unless qemu provides this SO.

Last edited by MetalInMyVeins (2024-09-30 05:55:32)

Offline

#4 2024-09-30 08:21:42

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,977

Re: Could not open '/lib/ld-linux-aarch64.so.1'

$ pacman -F  ld-linux-aarch64.so.1
extra/aarch64-linux-gnu-glibc 2.39-1
    usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1
$

aarch64-linux-gnu-glibc 2.39-1 is a dependency of aarch64-linux-gnu-gcc , so it should be present on your system.

Maybe qemu is looking in the wrong place, please post the exact command you use to start the vm AND it's full output/log .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB