Где находится заголовок socket.h в CentOS 8? - PullRequest
0 голосов
/ 04 мая 2020

В Ubuntu 20.04 у меня есть:

$ dpkg -S /usr/include/x86_64-linux-gnu/sys/socket.h 
libc6-dev:amd64: /usr/include/x86_64-linux-gnu/sys/socket.h

Тогда как в контейнере docker с CentOS 8 нет файла /usr/include/x86_64-linux-gnu/sys/socket.h и если я попробую

$ 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

и

$ rpm -q --whatprovides socket.h
no package provides socket.h

1 Ответ

2 голосов
/ 04 мая 2020

Вы можете передавать подстановочные знаки в 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

Итак, ваш ответ - glibc-headers.

...