Issue
On Ubuntu 20.04 I have:
$ dpkg -S /usr/include/x86_64-linux-gnu/sys/socket.h
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/socket.h
Whereas in a docker container with CentOS 8, there is no file /usr/include/x86_64-linux-gnu/sys/socket.h
and if I try
$ yum whatprovides socket.h
CentOS-8 - AppStream 1.8 MB/s | 7.0 MB 00:03
CentOS-8 - Base 3.3 MB/s | 2.2 MB 00:00
CentOS-8 - Extras 8.9 kB/s | 5.5 kB 00:00
Error: No Matches found
and
$ rpm -q --whatprovides socket.h
no package provides socket.h
Solution
You can pass wildcards to yum whatprovides
:
$ yum whatprovides /usr/include/*sys/socket.h
Last metadata expiration check: 0:00:26 ago on Mon 04 May 2020 04:34:26 PM EDT.
glibc-headers-2.30-5.fc31.i686 : Header files for development using standard C libraries.
Repo : fedora
Matched from:
Filename : /usr/include/sys/socket.h
glibc-headers-2.30-5.fc31.x86_64 : Header files for development using standard C libraries.
Repo : fedora
Matched from:
Filename : /usr/include/sys/socket.h
glibc-headers-2.30-11.fc31.x86_64 : Header files for development using standard C libraries.
Repo : @System
Matched from:
Filename : /usr/include/sys/socket.h
glibc-headers-2.30-11.fc31.x86_64 : Header files for development using standard C libraries.
Repo : updates
Matched from:
Filename : /usr/include/sys/socket.h
So your answer is glibc-headers
.
Answered By - larsks Answer Checked By - Marilyn (WPSolving Volunteer)