0

Just wanted to know where is this resolv.h configuration file is located in Ubuntu 22.04 LTS Jammy Jellyfish release.

I can able to find resolv.h and res_state.h in RHEL / Fedora distros but cannot able to find it in this Jammy Release. Not sure if it is discontinued or something in the latest releases, so Dropping this question here.

the requrement is to change the MAXNS value for adding morethan three nameservers in resolv.conf

Thanks in advance..!

Akshay
  • 1

1 Answers1

2

resolv.h and res_state.h are provided by libc6-dev in Ubuntu 22.04. They are installed in the following locations:

  • resolv.h: /usr/include/resolv.h

  • res_state.h: /usr/include/x86_64-linux-gnu/bits/types/res_state.h

Other packages that also provide resolv.h and res_state.h in Ubuntu 22.04:

If the Ubuntu can't find resolv.h and res_state.h you can add their containing directories to the $PATH variable by following the instructions in the answers to How to add a directory to the PATH?. The problem is there are several different files which all have the same name of either resolv.h or res_state.h, but they might be different files with the same name. Another possible problem is that even though resolv.h and res_state.h work in Fedora, they do not work in your situation in Ubuntu.

karel
  • 114,770
  • Hey, Thanks for your response.... I have verified these file paths.. these resolv.h is not found in the server.

    root@akubu01:~# ls -l /usr/include/resolv.h ls: cannot access '/usr/include/resolv.h': No such file or directory root@akubu01:~# root@akubu01:~# ls -l /usr/include/x86_64-linux-gnu/bits/types/res_state.h ls: cannot access '/usr/include/x86_64-linux-gnu/bits/types/res_state.h': No such file or directory

    do we need to install any specific library package or this is included in the base Pack of the OS?

    – Akshay Feb 23 '23 at 14:09
  • @Akshay I replied to your comment by editing my answer. – karel Feb 23 '23 at 14:16