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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2023-8-22 15:00:05 | 显示全部楼层 |阅读模式
编译openssh报错
9 l- O9 c. v" i0 T. @configure: error: PAM headers not found# M2 l  \+ C. h! ~! U! p
checking for arc4random_stir... no5 T: E: b" K2 w/ ~8 @" e
checking for arc4random_uniform... no, E/ h7 L7 [/ {; G
checking whether OpenSSL's PRNG is internally seeded... yes
+ ]+ K- x+ `9 k& h$ y3 p% W: Gchecking for ia_openinfo in -liaf... no) X# Z# b! \3 _
checking for crypt in -lcrypt... yes
- o) N' C# p- Q. \* p5 T. x1 cchecking for crypt... yes& Y9 ?/ z" D3 {9 g1 q/ Z
configure: error: PAM headers not found
, c9 u, `& F# n
' j* H: R2 q2 Q& e5 n% w' D6 T' ]1 d! {$ M9 O
$ R3 C0 |; u/ s) V( b) P
解决办法:/ ^. {7 ?, ~4 L- w* g. k+ b
yum install gcc zlib-devel pam-devel libselinux-devel zlib-devel openssl-devel -y) A9 L2 j' q' {/ u2 q6 M

- K. B/ ]7 z$ q. @7 p安装时openssl-devel会影响其他安装包安装过程,建议去掉使用下面的方式的:

4 x  @. R" g7 M4 D& Y5 S" N
yum install gcc zlib-devel pam-devel libselinux-devel zlib-devel -y1 }) @  O, B% T* p. m, ~

4 C2 Y9 ^; q" d3 W7 _& t" T& nglibc-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
4 J/ D. Z8 ~- _4 R* H/ S
3 c5 c8 K3 x1 D

: T+ Z9 ~. o4 o: o+ ^
9 n' r8 c4 x* w, R
% ?/ }& M: s! d

( N& H* p7 J3 J
& i* c$ O  i1 }- E  z/ _
! k! H' G6 e# D

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-8-22 15:00:06 | 显示全部楼层
yum install gcc zlib-devel pam-devel libselinux-devel zlib-devel -y
$ b  i. ]+ s7 i& r
1 k* g* s2 }$ L7 `7 b% g' t: x) yconfigure: WARNING: unrecognized options: --with-md5-passwords
2 `. A1 Y/ X9 p) r9 P  O! E
  M' E  x) U7 D! A. f: F3 {: HOpenSSH has been configured with the following options:; |  C! Z+ \& R% O" |) u' R
                     User binaries: /usr/bin' G9 X* a1 N  d' f$ c- _
                   System binaries: /usr/sbin* T* h8 [5 K. `* r( `+ @  h
               Configuration files: /etc/ssh
- P) |; M- Y4 k, w* V                   Askpass program: /usr/libexec/ssh-askpass
: l: v$ _. [  P8 N) k( D! t' t3 r2 H                      Manual pages: /usr/share/man/manX5 K2 W  ^5 f/ ^$ ]6 f
                          PID file: /var/run+ H/ U: D2 z1 _) K) O9 P' P# k
  Privilege separation chroot path: /var/empty
5 v  N& ]  Y- \  f# r            sshd default user PATH: /usr/bin:/bin:/usr/sbin:/sbin
1 e* h. j/ c7 d; a                    Manpage format: doc
9 y& O+ L3 @; Z; [% f                       PAM support: yes
4 n2 B" |8 Q$ V$ e9 p! I& ?2 X                   OSF SIA support: no, K; ?5 m4 h! V* M
                 KerberosV support: no8 h% h: P" h5 U, S6 B6 Z
                   SELinux support: no
$ ^( i, ^$ N6 B$ {. s  D# I                   libedit support: no
2 r! y1 M" ]4 A- G# {$ j3 D                   libldns support: no1 \+ q5 L* `! E8 f6 d
  Solaris process contract support: no
2 v( i0 v6 S: }  U# C: Q) G. x, d* R           Solaris project support: no
) S& p. P: w, o0 U4 o. }' ~7 M% B( V         Solaris privilege support: no7 ?7 M! Y/ K) T/ k
       IP address in $DISPLAY hack: no
" z3 }* [$ i) V7 B4 Z% X  v           Translate v4 in v6 hack: yes) c& \9 T: n& M
                  BSD Auth support: no
; S% V: K: x, a              Random number source: OpenSSL internal ONLY
/ m0 I9 A( y, u; S2 H( N, z             Privsep sandbox style: seccomp_filter" C, l5 f. c4 Y& v" o1 F  G  v3 ^
                   PKCS#11 support: yes
6 t& `! S$ ?  y0 A7 O# {0 Y( |                  U2F/FIDO support: yes0 g3 s& m7 T1 `5 Z+ }+ X( q
& w* Z/ M. ~& F/ a; E5 S4 f/ t  K
              Host: x86_64-pc-linux-gnu
4 R3 b$ S7 E8 b+ t( l* M* E          Compiler: cc -std=gnu110 p4 R0 J3 c2 B
    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  
7 {9 `2 K, V2 BPreprocessor flags: -I/usr/ssl  -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_GNU_SOURCE
5 h+ t" h0 J, o! K8 A4 i8 H6 p      Linker flags: -L/usr/ssl  -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -pie ( A9 s1 @1 p$ M* T
         Libraries: -ldl -lutil  -lresolv! a3 E- y# R; l3 s/ [
     +for channels: -lcrypto  -lz9 }! ?  L8 C% ?6 z; I: U
         +for sshd: -lcrypt  -lpam$ ]% E) A4 t) E6 Q, h" r/ H2 a

. Y: w4 T7 `; b, G1 cPAM is enabled. You may need to install a PAM control file ) K0 Z/ o7 ^& Q* a* x" S5 e. |
for sshd, otherwise password authentication may fail. * f) F3 W: }- w5 x9 j- R6 f
Example PAM control files can be found in the contrib/
2 R5 h9 |: {3 K- o- I5 Asubdirectory/ F$ c( b" X8 R4 J9 c) N) `  M# o9 t

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2023-8-22 15:00:07 | 显示全部楼层
报了错误
( V7 n1 [! ]1 u: O  p) d- ]
  g& R& O- Y% G- Mconfigure: error: PAM headers not found4 r; W4 |& `- z/ e
解决方案7 F+ Q' R8 R+ \2 L5 K- D$ s; p
yum -y install pam-devel
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:42 , Processed in 0.022846 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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