Centos

無法安裝 Perl 模組 Authen::Libwrap

  • July 18, 2015

嘗試安裝時出現此錯誤。我該如何安裝它?Webmin 依賴於它。

[root@ip-172-31-15-65 home]# cpan Authen::Libwrap
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
 Database was generated on Sat, 05 Apr 2014 04:41:02 GMT
Running install for module 'Authen::Libwrap'
CPAN: YAML loaded ok (v0.90)
Running make for D/DM/DMUEY/Authen-Libwrap-0.22.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.064)
Checksum for /root/.cpan/sources/authors/id/D/DM/DMUEY/Authen-Libwrap-0.22.tar.gz ok
Authen-Libwrap-0.22
Authen-Libwrap-0.22/Build.PL
Authen-Libwrap-0.22/ChangeLog
Authen-Libwrap-0.22/example.pl
Authen-Libwrap-0.22/Makefile.PL
Authen-Libwrap-0.22/MANIFEST
Authen-Libwrap-0.22/META.yml
Authen-Libwrap-0.22/ppport.h
Authen-Libwrap-0.22/README
Authen-Libwrap-0.22/lib
Authen-Libwrap-0.22/lib/Authen
Authen-Libwrap-0.22/lib/Authen/Libwrap.pm
Authen-Libwrap-0.22/lib/Authen/Libwrap.xs
Authen-Libwrap-0.22/t
Authen-Libwrap-0.22/t/01_inline.t
Authen-Libwrap-0.22/t/02_maintainer.t
Authen-Libwrap-0.22/t/03_pod.t
Authen-Libwrap-0.22/t/hosts.allow
CPAN: File::Temp loaded ok (v0.22)
CPAN: Module::Build loaded ok (v0.4205)

 CPAN.pm: Going to build D/DM/DMUEY/Authen-Libwrap-0.22.tar.gz

enter include directory to use: [/usr/include ]
/usr/include
enter library directory to use: [/usr/lib ]
/usr/lib
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Authen-Libwrap' version '0.22'
Building Authen-Libwrap
Error: Function definition too short '/ * EOF * /' in Libwrap.xs, line 32
gcc -I/usr/lib64/perl5/CORE -DXS_VERSION="0.22" -DVERSION="0.22" -fPIC -I/usr/include -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o lib/Authen/Libwrap.o lib/Authen/Libwrap.c
lib/Authen/Libwrap.xs:9:18: error: tcpd.h: No such file or directory
lib/Authen/Libwrap.xs: In function ‘XS_Authen__Libwrap__hosts_ctl’:
lib/Authen/Libwrap.xs:24: warning: implicit declaration of function ‘hosts_ctl’
error building lib/Authen/Libwrap.o from 'lib/Authen/Libwrap.c' at /usr/local/share/perl5/ExtUtils/CBuilder/Base.pm line 175.
 DMUEY/Authen-Libwrap-0.22.tar.gz
 ./Build -- NOT OK
Running Build test
 Can't test without successful make
Running Build install
 Make had returned bad status, install seems impossible
[root@ip-172-31-15-65 home]#


[root@ip-172-31-15-65 home]# yum search libwrap
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
* Webmin: download.webmin.com
* base: mirrors.syringanetworks.net
* extras: mirror.spro.net
* updates: mirror.hmc.edu
Warning: No matches found for: libwrap
No Matches found
[root@ip-172-31-15-65 home]#

這個找到了

yum whatprovides "*/tcpd.h"

然後

yum install tcp_wrappers-devel

但後來它需要

cpan Sub::Uplevel

最後我能夠Authen::Libwrap成功地製作、測試和安裝。

引用自:https://serverfault.com/questions/586979