Network Backend 'User' Is Not Compiled into This Binary

I have build qemu-7.2.0 and then, when running it I am getting

qemu-system-x86_64: -nic user,model=virtio: network backend 'user' is not compiled into this binary

Apparently, I should enable this feature during build, but how to know which is it namely?

2 Answers

The 'user' networking backend is provided by the 'slirp' library; you get this message when the QEMU binary was built without slirp support compiled in.

As noted in the 7.2 changelog, QEMU no longer ships a copy of the slirp module with its sources. Instead you need to make sure you have installed your distro's libslirp development package (which is probably called libslirp-devel or libslirp-dev or something similar) before configuring and building QEMU. You need at least libslirp 4.7 or better.

QEMU's configure convention for optional features which require some build-time dependency is:

  • by default, check for the dependency, and build in the feature if we find it
  • if --enable-foo is passed, check for the dependency, and fail configure with an error if it is missing
  • if --disable-foo is passed, don't check, and never build in the feature

So you can pass configure --enable-slirp to force it to give you an error if you haven't got the dependency, as a way of checking that you've installed the right system package for libslirp.

7

$ git clone

$ sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev ninja-build meson

$ git clone

$ cd libslirp

$ meson build

$ ninja -C build install

$ cd ..

$ cd qemu

$ mkdir -p bin/debug/native

$ cd bin/debug/native

$ ../../.././configure --enable-slirp --enable-debug

$ make -j$(nproc)

$ make install

$ cd ../../..

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest