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.comInstall libelf-dev and elfutils package. If you are using Ubuntu or any Debian variant then use the following command to install them.
sudo apt install libelf-dev
This turns out to be another dimension of the problem reported here but in an earlier kernel.
The solution is the same - but in addition to squelching PKG_CONFIG_PATH in tools/objtool/Makefile it is also necessary to do it in the kernel's toplevel Makefile:
-HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
+HOST_LIBELF_LIBS = $(shell PKG_CONFIG_PATH= pkg-config libelf --libs 2>/dev/null || echo -lelf)