0

私がビルドした Perl 5.14.1 のビルドで動作するようにしようとしている古い Perl コードがいくつかあります。しかし、何らかの理由で Perl モジュール NDBM_File がありません。

$ perl -MNDBM_File -e1;
Can't locate NDBM_File.pm in @INC (@INC contains: /apps/perl-5.14.1/lib/dev_perl/x86_64-linux-thread-multi /apps/perl-5.14.1/lib/dev_perl /apps/perl-5.14.1/lib/vendor_perl/5.14.1/x86_64-linux-thread-multi /apps/perl-5.14.1/lib/vendor_perl/5.14.1 /apps/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi /apps/perl-5.14.1/lib/5.14.1 /apps/perl-5.14.1/lib/site_perl .).
BEGIN failed--compilation aborted.

これが私が得るperl -V出力です...

Summary of my perl5 (revision 5 version 14 subversion 1) configuration:
Platform:
    osname=linux, osvers=2.6.32-220.17.1.el6.x86_64, archname=x86_64-linux-thread-multi
    uname='linux myhost.mydomain 2.6.32-220.17.1.el6.x86_64 #1 smp thu apr 26 13:37:13 edt 2012 x86_64 x86_64 x86_64 gnulinux '
config_args='-Dcc=gcc -A ccflags=-fPIC -Dprefix=/apps/perl-5.14.1 -Dsitelib=/apps/perl-5.14.1/lib/dev_perl -Dvendorprefix=/apps/perl-5.14.1 -Dotherlibdirs=/apps/perl-5.14.1/lib/site_perl -Duseithreads=define -de'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fPIC -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fPIC -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.6 20110731 (Red Hat 4.4.6-3)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib/../lib64 /usr/lib/../lib64 /lib /usr/lib /lib64 /usr/lib64 /usr/local/lib64
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.12'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
                    PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                    PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
                    USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
                    USE_REENTRANT_API
Built under linux
Compiled at Aug 27 2012 14:20:48
@INC:
/apps/perl-5.14.1/lib/dev_perl/x86_64-linux-thread-multi
/apps/perl-5.14.1/lib/dev_perl
/apps/perl-5.14.1/lib/vendor_perl/5.14.1/x86_64-linux-thread-multi
/apps/perl-5.14.1/lib/vendor_perl/5.14.1
/apps/perl-5.14.1/lib/5.14.1/x86_64-linux-thread-multi
/apps/perl-5.14.1/lib/5.14.1
/apps/perl-5.14.1/lib/site_perl
.

私はこのファイルを持っています...

/apps/perl-5.14.1/lib/5.14.1/Memoize/NDBM_File.pm

...しかし、失敗する「use NDBM_File」を行います。

Perl を間違ってビルドしましたか?

4

1 に答える 1

4

https://metacpan.org/module/AnyDBM_Fileから:

                        odbm    ndbm    sdbm    gdbm    bsd-db
                        ----    ----    ----    ----    ------
Linkage comes w/ perl   yes     yes     yes     yes     yes
Src comes w/ perl       no      no      yes     no      no
...

つまり、「標準で」サポートされている唯一の DBM バックエンドは SDBM_File です。libgdbm-devパッケージをインストールして Perl を再コンパイルする必要があると思います。

于 2012-11-12T21:49:58.957 に答える