you need to install linix headers generic by:

sudo apt-get update
sudo apt-get install linux-generic

I see you already have downloaded the realtek wifi drivers make sure you are in the right directory and run this to install them:

cd rtlwifi_new
sudo dkms add ../rtlwifi_new
sudo dkms build rtlwifi-new/0.6 
sudo dkms install rtlwifi-new/0.6
sudo modprobe -v rtl8723de ant_sel=2

Congrats you have running wifi.

Save the config with this command:

sudo /bin/sh -c 'echo "options rtl8723de ant_sel=2" >> /etc/modprobe.d/rtl8723de.conf'

Restart.

Details here:

https://h30434.www3.hp.com/t5/Notebook-Wireless-and-Networking/Realtek-8723DE-wifi-module-amp-Bluetooth-Linux-driver/td-p/6477307

Answer from Wolfie on askubuntu.com
🌐
Debian
packages.debian.org › sid › libelf-dev
Debian -- Details of package libelf-dev in sid
This package contains development libraries and header files for libelf1.
🌐
Zoomadmin
zoomadmin.com › HowToInstall › UbuntuPackage › libelf-dev
How to install libelf-dev ubuntu package on Ubuntu 20.04/Ubuntu 18.04/Ubuntu 19.04/Ubuntu 16.04
libelf1 development libraries and ... to update package repositories and get latest package information. ... Run the install command with -y flag to quickly install the packages and dependencies....
🌐
Install Lion
installlion.com › kali › kali › main › l › libelf-dev › install › index.html
Installlion: How To Install libelf-dev on kali
×Are you having problems? You can always remove libelf-dev again by following the instructions at this link. /kali/kali/main///install/index.html libelf1 development libraries and header files files on a high level.
🌐
Ubuntu Packages
ubuntu.pkgs.org › 18.04 › ubuntu-main-amd64 › libelf-dev_0.170-0.4_amd64.deb.html
libelf-dev_0.170-0.4_amd64.deb Ubuntu 18.04 LTS Download
libelf1 provides a shared library which allows reading and writing of ELF files on a high level. This package contains development libraries and header files for libelf1. Update the package index: # sudo apt-get update · Install libelf-dev deb package: # sudo apt-get install libelf-dev ·
Find elsewhere
🌐
Debian
packages.debian.org › buster › libelf-dev
Debian -- Details of package libelf-dev in buster
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Pkgs.org
pkgs.org › download › libelf-dev
Libelf-dev Download for Linux (apk deb)
Download libelf-dev packages for Adélie, Debian, Ubuntu
🌐
DevManuals
devmanuals.net › install › ubuntu › ubuntu-20-04-focal-fossa › installing-libelf-dev-on-ubuntu20-04.html
How to install libelf-dev on Ubuntu 20.04 (Focal Fossa)?
After downloading the latest package list with the help of above you can run the installation process. If libelf-dev Architecture: amd64 Version: 0.176-1.1build1 Multi-Arch: same is not installed on your compter then the command 'dpkg -L libelf-dev Architecture: amd64 Version: 0.176-1.1build1 ...
🌐
Ubuntu
launchpad.net › ubuntu › jammy › +package › libelf-dev
libelf-dev : Jammy (22.04) : Ubuntu
libelf1 provides a shared library which allows reading and writing of ELF files on a high level. . This package contains development libraries and header files for libelf1.
🌐
Debian
packages.debian.org › bullseye › libelf-dev
Debian -- Details of package libelf-dev in bullseye
This package contains development libraries and header files for libelf1.
🌐
Ubuntu
launchpad.net › ubuntu › bionic › +package › libelf-dev
libelf-dev : Bionic (18.04) : Ubuntu - Launchpad
libelf1 provides a shared library which allows reading and writing of ELF files on a high level. . This package contains development libraries and header files for libelf1.
🌐
Ubuntu
packages.ubuntu.com › bionic › libelf-dev
Ubuntu – Error
two or more packages specified (libelf-dev bionic) Content Copyright © 2026 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
Debian
packages.debian.org › jessie › libelf-dev
Debian -- Error
Developers' Corner · / Packages · two or more packages specified (libelf-dev jessie) See our contact page to get in touch. Content Copyright © 1997 - 2026 SPI Inc.; See license terms. Debian is a trademark of SPI Inc. Learn more about this site.
🌐
Fedora
packages.fedoraproject.org › pkgs › elfutils › elfutils-libelf-devel › index.html
elfutils-libelf-devel - Fedora Packages
The elfutils-libelf-devel package contains the libraries to create applications for handling compiled objects.
🌐
Fedora Discussion
discussion.fedoraproject.org › ask fedora
Cannot install elfutils-libelf-devel-static - Fedora Discussion
February 11, 2021 - The file is libelf.a. I see that this file is provided by elfutils-libelf-devel-static but running the following command: [VM] sudo dnf install elfutils-libelf-devel-static Last metadata expiration check: 0:30:35 ago on Thu 11 Feb 2021 02:20:34 ...
🌐
GitHub
github.com › ivandavidov › minimal › issues › 141
Linux kernel 4.14.12 requires "libelf-dev". · Issue #141 · ivandavidov/minimal
January 5, 2018 - The most recent stable kernel has new build dependency. Makefile:942: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-de...
Author   ivandavidov