Missing header files in /usr/include/rpc on RHEL8 and later

Solution Verified - Updated -

Issue

  • On RHEL7 we use #include <rpc/rpc.h> and the headers are at:
$ ls -1 /usr/include/rpc/
auth_des.h
auth.h
auth_unix.h
clnt.h
des_crypt.h
key_prot.h
netdb.h
pmap_clnt.h
pmap_prot.h
pmap_rmt.h
rpc_des.h
rpc.h
rpc_msg.h
svc_auth.h
svc.h
types.h
xdr.h
  • On RHEL8, these files are no longer present:
$ ls -1 /usr/include/rpc/
netdb.h
  • During compilation of our application code on RHEL9, we are facing:
Compilation Error:
fatal error: rpc/rpc.h: No such file or directory #include <rpc/rpc.h>. 

Environment

  • Red Hat Enterprise Linux 8 and later
  • GNU C library (glibc) header files
  • Sun RPC (sunrpc) header files

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content