Install libnss-resolve by entering the following commands in the terminal:
sudo apt update sudo apt install libnss-resolve
nss module to resolve names via systemd-resolved
nss-resolve is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing DNS and LLMNR resolution to programs via the systemd-resolved daemon (provided in the systemd package). . Installing this package automatically adds resolve to /etc/nsswitch.conf.