安装Term :: TermKey会返回错误

时间:2011-11-27 16:32:37

标签: perl module cpan perl-module term

使用CPAN安装Term :: TermKey时遇到问题,我找不到有关如何解决它的信息。这是一个输出:

cpan[9]> install Term::TermKey
Running install for module 'Term::TermKey'
Running Build for P/PE/PEVANS/Term-TermKey-0.10.tar.gz
  Checksum was ok
  '/usr/bin/perl Build.PL installdirs=site' returned status 256, won't make
Running Build test
  Make had some problems, won't test
Running Build install
  Make had some problems, won't install
是的,有人能帮帮我吗?

//修改

我安装了libtermkey,但我仍有问题:

Building Term-TermKey
cc -I/usr/lib/perl5/core_perl/CORE -DXS_VERSION="0.10" -DVERSION="0.10" -fPIC -I/usr/local/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 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -o lib/Term/TermKey.o lib/Term/TermKey.c
ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Term/TermKey/TermKey.bs')
cc -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -fstack-protector -o blib/arch/auto/Term/TermKey/TermKey.so lib/Term/TermKey.o -L/usr/local/lib -ltermkey
  PEVANS/Term-TermKey-0.10.tar.gz
  ./Build -- OK
'YAML' not installed, will not store persistent state
Running Build test
t/00use.t ........... 1/1 
#   Failed test 'use Term::TermKey;'
#   at t/00use.t line 8.
#     Tried to use 'Term::TermKey'.
#     Error:  Can't load '/root/.cpan/build/Term-TermKey-0.10-Y5j3Oz/blib/arch/auto/Term/TermKey/TermKey.so' for module Term::TermKey: libtermkey.so.1: nie można otworzyć pliku obiektu dzielonego: Nie ma takiego pliku ani katalogu at /usr/lib/perl5/core_perl/DynaLoader.pm line 190.

每次测试都失败了。我不知道为什么。有-L/usr/local/lib -ltermkey,所以我检查了这个目录:

ciembor@peace lib]$ ls | grep libtermkey
libtermkey.a
libtermkey.la
libtermkey.so
libtermkey.so.1
libtermkey.so.1.4.0

所有文件都在他们的位置......

1 个答案:

答案 0 :(得分:-1)

通过CPAN安装模块时,如果安装失败,则不会看到许多错误消息。我建议通过http://search.cpan.org手动下载Term-TermKey-0.10.tar.gz,提取它然后

perl Makefile.PL
make
make test
sudo make install

在我的机器上,我在第一步告诉我没有安装libtermkey,它指向我下载。