1

I'm having problems using qemu on Ubuntu

hoan@hoan-pfiev09:~$ qemu-system-aarch64 
qemu-system-aarch64: symbol
lookup error: qemu-system-aarch64: undefined symbol:
libusb_free_streams hoan@hoan-pfiev09:~$

(Actually the command I want to run: qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic -kernel openwrt-arm64-qemu-virt.Image)

Although I installed libusb with the command sudo apt-get install libusb-1.0-0-dev, but can not fix this.

hoan@hoan-pfiev09:~$ ldd /usr/bin/qemu-system-aarch64 | grep usb    libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f2bc8849000)  libusbredirparser.so.1 => /usr/lib/x86_64-linux-gnu/libusbredirparser.so.1 (0x00007f2bc8641000) hoan@hoan-pfiev09:~$

How to fix this?

hoan@hoan-pfiev09:~$ ldd /usr/bin/qemu-system-aarch64 |grep usb     libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f705b013000)  libusbredirparser.so.1 => /usr/lib/x86_64-linux-gnu/libusbredirparser.so.1 (0x00007f705ae0b000) hoan@hoan-pfiev09:~$  hoan@hoan-pfiev09:~$  hoan@hoan-pfiev09:~$ ls /usr/local/lib/libusb-1.0.* -lia 14156758 -rw-r--r-- 1 root root 598258  7月 23 19:25 /usr/local/lib/libusb-1.0.a 14156755 -rwxr-xr-x 1 root root    954  7月 23 19:25 /usr/local/lib/libusb-1.0.la 14156754 lrwxrwxrwx 1 root root     19  7月 23 19:25 /usr/local/lib/libusb-1.0.so -> libusb-1.0.so.0.1.0 14156753 lrwxrwxrwx 1 root root     19  7月 23 19:25 /usr/local/lib/libusb-1.0.so.0 -> libusb-1.0.so.0.1.0 14156267
-rwxr-xr-x 1 root root 343240  7月 23 19:25 /usr/local/lib/libusb-1.0.so.0.1.0 hoan@hoan-pfiev09:~$

hoan@hoan-pfiev09:~$ strings /usr/local/lib/libusb-1.0.a | grep libusb_free_streams hoan@hoan-pfiev09:~$

add more infor

hoan@hoan-pfiev09:~$ ldd /usr/bin/qemu-system-aarch64 | grep usb libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f00a6281000) libusbredirparser.so.1 => /usr/lib/x86_64-linux-gnu/libusbredirparser.so.1 (0x00007f00a6079000) hoan@hoan-pfiev09:~$

  • Hi everyone, this problem fixed by command : >sudo ln -sf /lib/x86_64-linux-gnu/libusb-1.0.so.0 /usr/local/lib/libusb-1.0.so.0. But when I run command "sudo ldconfig" . The system returned to the previous error. – Hoan-pfiev09 Jul 24 '18 at 01:20

3 Answers3

3

This error also fixed by command

hoan@hoan-pfiev09:~$ sudo ldconfig /lib/x86_64-linux-gnu/

1

Thanks for reading my question. I found the answer [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711589][1] there was a link library is incorrect here.

Fixed by command:

sudo ln -sf /lib/x86_64-linux-gnu/libusb-1.0.so.0  /usr/local/lib/libusb-1.0.so.0
0

I've seen things similar to this several times. My self-educated guess would be that in fact this specific package of QEMU requires a fresher version of libusb. So the solution would be to upgrade your libusb to latest version. Or at least to the version that satisfies your installation of QEMU.

Also, the library name is often a symbolic link to the specific library version. You may have a fresher version of the library installed, but the link would still point to an older version. Please check your libusb libraries in /usr/local/lib/, and check the link /lib/XXX/libusb-1.0.so.

Aleksey
  • 623
  • 5
  • 10
  • Aleksey:thankyou,I've added some information, I also believe the library link is corrupt but I do not know how to fix it, do you have any more ideas? – Hoan-pfiev09 Jul 24 '18 at 00:37