安装Term :: TermKey返回错误 [英] Installing Term::TermKey returns error

查看:210
本文介绍了安装Term :: TermKey返回错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用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

所有文件都在原处...

解决方案

确保/usr/local/lib也出现在$LD_LIBRARY_PATH/etc/ld.so.conf中.否则,即使pkg-config可以找到termkey.pc文件来告诉编译器<termkey.h>文件在哪里,(运行时)链接程序也将无法在运行时针对实际的libtermkey.so文件进行链接.

或者,如果您的操作系统支持,则可以将libtermkey作为真正的软件包安装-我将软件包保留在 http://packages.leonerd.org.uk/用于Debian测试/不稳定;它也可能适用于其他Debian衍生的发行版,例如Ubuntu.

I have a problem while installing Term::TermKey with CPAN and I can't find information about how to solve it. Here is an output:

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

May someone help me?

//edit

I installed libtermkey but I still have a problem:

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.

It fails on every test. I don't know why. There is -L/usr/local/lib -ltermkey, so I've checked this directory:

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

And all files are on their place...

解决方案

Make sure that /usr/local/lib is also present in either $LD_LIBRARY_PATH or /etc/ld.so.conf. Without that, even if pkg-config can find the termkey.pc file which tells the compiler where the <termkey.h> files are, the (runtime) linker will not be able to link against the actual libtermkey.so file at runtime.

Alternatively, you could install libtermkey as a real package if your OS supports such - I keep a package on http://packages.leonerd.org.uk/ for Debian testing/unstable; it may also be suitable for other Debian-derived distributions such as Ubuntu.

这篇关于安装Term :: TermKey返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆