找回密码
 注册
查看: 417|回复: 2

configure: error: PAM headers not found,编译openssh服务报错解决方法

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2023-8-22 15:00:05 | 显示全部楼层 |阅读模式
编译openssh报错5 I# a+ E3 O& B4 C
configure: error: PAM headers not found" w' c5 W! O  l# g6 M. H; B) S1 }
checking for arc4random_stir... no
5 t; [" c1 V& bchecking for arc4random_uniform... no/ l7 K$ N5 j) c* `! f
checking whether OpenSSL's PRNG is internally seeded... yes
, S& ]% d7 u( L/ _. Kchecking for ia_openinfo in -liaf... no2 P4 V4 x1 W8 K/ `( p3 B; P" g6 b
checking for crypt in -lcrypt... yes! E2 U3 ]' B+ W% q- \6 a0 b; Q' N
checking for crypt... yes
. D4 w$ i& N* Y! o& h2 V$ d) tconfigure: error: PAM headers not found( Y$ H0 L# U4 ~) S
' D2 W" s+ ?5 w6 u1 j
! A5 A& A/ |" h  s

# m6 O# Y+ K3 {' b1 |! N& q解决办法:
5 [* j( R8 i8 M+ f# `yum install gcc zlib-devel pam-devel libselinux-devel zlib-devel openssl-devel -y6 G9 X4 @5 e# N9 g8 @
: M- |% Y- |; q; r
安装时openssl-devel会影响其他安装包安装过程,建议去掉使用下面的方式的:
4 I$ u; N% S. Z. M
yum install gcc zlib-devel pam-devel libselinux-devel zlib-devel -y! E% g! K" s7 c6 b1 ~$ Q
+ T7 A6 h- h" P, i" R6 H, V
glibc-2.17-325.el7_9.i686 is a duplicate with glibc-2.17-317.el7.x86_64glibc-common-2.17-325.el7_9.x86_64 is a duplicate with glibc-common-2.17-317.el7.x86_64krb5-libs-1.15.1-50.el7.x86_64 is a duplicate with krb5-libs-1.15.1-37.el7_6.x86_64krb5-libs-1.15.1-51.el7_9.i686 is a duplicate with krb5-libs-1.15.1-50.el7.x86_64libselinux-2.5-15.el7.i686 is a duplicate with libselinux-2.5-14.1.el7.x86_64libselinux-python-2.5-15.el7.x86_64 is a duplicate with libselinux-python-2.5-14.1.el7.x86_64libselinux-utils-2.5-15.el7.x86_64 is a duplicate with libselinux-utils-2.5-14.1.el7.x86_64nspr-4.32.0-1.el7_9.x86_64 is a duplicate with nspr-4.21.0-1.el7.x86_64nss-softokn-freebl-3.67.0-3.el7_9.i686 is a duplicate with nss-softokn-freebl-3.44.0-8.el7_7.x86_64nss-util-3.67.0-1.el7_9.x86_64 is a duplicate with nss-util-3.44.0-4.el7_7.x86_641:openssl-1.0.2k-24.el7_9.x86_64 is a duplicate with 1:openssl-1.0.2k-19.el7.x86_641:openssl-libs-1.0.2k-24.el7_9.i686 is a duplicate with 1:openssl-libs-1.0.2k-19.el7.x86_64policycoreutils-2.5-34.el7.x86_64 is a duplicate with policycoreutils-2.5-29.el7_6.1.x86_64selinux-policy-3.13.1-268.el7.noarch is a duplicate with selinux-policy-3.13.1-229.el7_6.12.noarchselinux-policy-targeted-3.13.1-268.el7.noarch is a duplicate with selinux-policy-targeted-3.13.1-229.el7_6.12.noarchzlib-1.2.7-19.el7_9.i686 is a duplicate with zlib-1.2.7-18.el7.x86_64% e1 c+ u8 t! f
9 R8 m& x1 m" z1 [

# W3 \( |, n: a4 q& ]0 p( U/ i- ^4 b4 U
0 W; _9 |6 V. E/ z- t
4 M. |# `- @5 D

9 p5 M6 u/ Z; S
! j5 K# N/ D% I9 c

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-8-22 15:00:06 | 显示全部楼层
yum install gcc zlib-devel pam-devel libselinux-devel zlib-devel -y
3 Y8 F5 O! T8 E' s) n7 j0 `1 g3 s; r1 S: n) p
configure: WARNING: unrecognized options: --with-md5-passwords+ J* O1 D. Z: `/ H( Y! C' |+ x

/ a  C) j' ]6 tOpenSSH has been configured with the following options:
9 h4 Q1 m) N# |4 {5 N                     User binaries: /usr/bin
7 E$ ?, D) y8 O& m0 u" W                   System binaries: /usr/sbin! U# e& Y7 j7 U  C/ ]
               Configuration files: /etc/ssh
- s/ N* A/ `, ^. l7 t! s- j% |6 j' W                   Askpass program: /usr/libexec/ssh-askpass* ]) v. L5 t- L9 F3 J- G0 m
                      Manual pages: /usr/share/man/manX, f$ u. p  S. d: c% Z& `' j
                          PID file: /var/run
8 s. l* V$ I! l  Privilege separation chroot path: /var/empty1 k) S$ B  F) D$ h$ X1 D& B
            sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin( k5 u- d% e/ h+ b
                    Manpage format: doc
" ~( u8 ]6 b2 H- z% m4 ]                       PAM support: yes! }. u, z4 B) b7 o: N, U( l4 x
                   OSF SIA support: no
( z4 `* O+ s. _  G5 g                 KerberosV support: no6 I' o! x$ Q8 |
                   SELinux support: no
' o, A9 z4 r" u                   libedit support: no
4 v/ ]# ~2 {7 [* R. t                   libldns support: no
( s/ Q: B1 {' W& E0 f# p% S  Solaris process contract support: no9 P3 s; J7 D8 @/ ~5 H
           Solaris project support: no
. }, {+ n1 r, @4 `2 W5 J4 R         Solaris privilege support: no" P- e# l  \" q7 ^) D
       IP address in $DISPLAY hack: no
  @# h% w$ c& o- h           Translate v4 in v6 hack: yes, b$ ~8 _; k& h6 s$ @
                  BSD Auth support: no
( \6 G% @* A8 _1 C$ U' a              Random number source: OpenSSL internal ONLY4 r+ X% ?1 G: D8 e
             Privsep sandbox style: seccomp_filter  W; o% ?. y1 Y* B
                   PKCS#11 support: yes) Z0 U9 P& j/ R* K+ ?, U
                  U2F/FIDO support: yes
6 x. a  ^5 O' ?2 B* M/ H; Z& I) Z" j
              Host: x86_64-pc-linux-gnu
: X; E* o7 M8 u2 e; t& m" m: o          Compiler: cc -std=gnu11
" V7 }, S/ e. E. j( `, ~- q    Compiler flags: -g -O2 -pipe -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-strong -fPIE  
% u8 y! P# ~2 X- vPreprocessor flags: -I/usr/ssl  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE
* ~$ {7 R7 e1 Q      Linker flags: -L/usr/ssl  -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -pie
  v0 A- G- j9 g8 g  l$ ~2 }+ E         Libraries: -ldl -lutil  -lresolv7 i6 a! t; ?3 `8 Z1 ]
     +for channels: -lcrypto  -lz% b& O. ]/ x" m. Q
         +for sshd: -lcrypt  -lpam
# G" h; h: o' |4 G9 I) c5 g& w+ X8 ^9 x* P) }1 c
PAM is enabled. You may need to install a PAM control file
0 O5 _# A0 \. Q1 t( J# D5 u, yfor sshd, otherwise password authentication may fail.
5 j+ ]" `6 x- S, {Example PAM control files can be found in the contrib/ * H5 Q( P9 n# k1 @* |- B3 v. m  N  i
subdirectory
  q7 ~' Z$ P5 O: G% d1 @' s

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-8-22 15:00:07 | 显示全部楼层
报了错误4 {, P$ K! Z2 L! w& N! Y/ h) D" [- c

" S+ V# b. @( A+ Tconfigure: error: PAM headers not found# i0 b7 }. k: ^% d
解决方案
4 `& U& B3 F0 L- v9 ^yum -y install pam-devel
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 01:48 , Processed in 0.027315 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表