Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: DTC (libfdt) version >= 1.4.2 not present. Please install the DTC (libfdt) devel package

Tags:

qemu

I am trying to compile qemu from source, I'm trying to install qemu for hisilicon, but when I run ./configure I receive the error

ERROR: DTC (libfdt) version >= 1.4.2 not present.
   Please install the DTC (libfdt) devel package

I have already installed qemu

sudo apt-get install -y qemu-kvm qemu virt-manager virt-viewer libvirt-bin

and I've already installed libfdt

sudo apt install libfdt-dev

But I'm still getting this message.

How can I install libfdt?

like image 621
Yazan W Yusuf Avatar asked Dec 18 '25 09:12

Yazan W Yusuf


1 Answers

To fix this issue:

I cloned dtc from its repository and extracted the tarball to qemu/dtc/.

Compiled dtc from source first using make

Restarted configuring qemu.

The problem was qemu tries to search for dtc binaries in qemu/dtc. Even if you have installed dtc using sudo apt-get install device-tree-compiler, you will get the above error(mentioned in the question), so you probably need to have the binaries in qemu/dtc.

like image 168
Yazan W Yusuf Avatar answered Dec 21 '25 05:12

Yazan W Yusuf