(Perl) 无法进行“初始化” Mac OSX 10.6 中的 Term::ReadLine::Gnu

发布于 2024-10-01 08:58:41 字数 1144 浏览 1 评论 0原文

我最近安装了 MacPorts,我认为它可能弄乱了我的一些库。现在,当我尝试运行 Perl 调试器时,我得到以下信息:

perl -d -e 0

Cannot do `initialize' in Term::ReadLine::Gnu at /opt/local/lib/perl5/5.8.9/perl5db.pl line 6006
 at /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Term/ReadLine/Gnu.pm line 716
    Term::ReadLine::Gnu::AU::AUTOLOAD('Term::ReadLine=HASH(0x8f8b94)') called at /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Term/ReadLine/Gnu.pm line 240
    Term::ReadLine::Gnu::new('Term::ReadLine', 'perldb', 'GLOB(0x85c690)', 'GLOB(0x855750)') called at /opt/local/lib/perl5/5.8.9/perl5db.pl line 6006
    DB::setterm called at /opt/local/lib/perl5/5.8.9/perl5db.pl line 2235
    DB::DB called at -e line 1
Cannot do `initialize' in Term::ReadLine::Gnu at /opt/local/lib/perl5/5.8.9/perl5db.pl line 6006
END failed--call queue aborted at -e line 44.
 at -e line 44
Config::DESTROY(/opt/local/lib/perl5/5.8.9/darwin-2level/Config.pm:63):
63: sub DESTROY { }
IO::Handle::DESTROY(/opt/local/lib/perl5/5.8.9/darwin-2level/IO/Handle.pm:330):
330:    sub DESTROY {} 

我正在使用 readline 6.1。有人有什么想法吗?

谢谢

I recently installed MacPorts and I think it might have messed up some of my libraries. Now when I try to run the Perl debugger I get this:

perl -d -e 0

Cannot do `initialize' in Term::ReadLine::Gnu at /opt/local/lib/perl5/5.8.9/perl5db.pl line 6006
 at /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Term/ReadLine/Gnu.pm line 716
    Term::ReadLine::Gnu::AU::AUTOLOAD('Term::ReadLine=HASH(0x8f8b94)') called at /opt/local/lib/perl5/site_perl/5.8.9/darwin-2level/Term/ReadLine/Gnu.pm line 240
    Term::ReadLine::Gnu::new('Term::ReadLine', 'perldb', 'GLOB(0x85c690)', 'GLOB(0x855750)') called at /opt/local/lib/perl5/5.8.9/perl5db.pl line 6006
    DB::setterm called at /opt/local/lib/perl5/5.8.9/perl5db.pl line 2235
    DB::DB called at -e line 1
Cannot do `initialize' in Term::ReadLine::Gnu at /opt/local/lib/perl5/5.8.9/perl5db.pl line 6006
END failed--call queue aborted at -e line 44.
 at -e line 44
Config::DESTROY(/opt/local/lib/perl5/5.8.9/darwin-2level/Config.pm:63):
63: sub DESTROY { }
IO::Handle::DESTROY(/opt/local/lib/perl5/5.8.9/darwin-2level/IO/Handle.pm:330):
330:    sub DESTROY {} 

I'm using readline 6.1. Anyone have any ideas?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

最美不过初阳 2024-10-08 08:58:41

我刚刚在 Mac 上遇到了这个问题。有趣的是,我尝试进入 cpan 交互式控制台也产生了同样的错误。

根据一些网络搜索,我然后运行了这个命令:
cpan install Term::ReadLine::Gnu

这为我解决了这个问题。然后,我能够进入 cpan 交互式控制台并使用 perl -d -e 0 运行 perl 调试器

I just encountered this issue on my Mac. Interestingly, my attempts to enter the cpan interactive console also generated this same error.

Based on some web searches, I then ran this command:
cpan install Term::ReadLine::Gnu

This resolved the issue for me. I was then able to enter the cpan interactive console as well as run the perl debugger using perl -d -e 0

故人的歌 2024-10-08 08:58:41

我在 Macports 版本的 Perl 上一直不太幸运。我总是自己安装。

您不会安装相同的模块,因为(例如)5.8、5.9 和 5.10 不是二进制兼容的。有问题的模块可能需要 C 编译器来构建。

您是否有某些原因不想构建和安装现代版本的 Perl?

I’ve never had much luck with the Macports version of Perl. I always install my own.

You aren’t going to have the same modules installed, because (for example), 5.8, 5.9, and 5.10 are not binary compatibile. The module in question likely requires a C compiler to build.

Is there some reason you don’t want to build and install a modern version of Perl?

乖乖兔^ω^ 2024-10-08 08:58:41

我不知道这在 OSX 上如何工作,但我在 Linux 上遇到了同样的问题。我通过安装 libtermcap2(deb) 或 compat-libtermcap(rpm) 解决了这个问题。

我在这里找到了解决方案

I don't know how this work on OSX, but I just had the same problem on linux. I solved it by installing libtermcap2(deb) or compat-libtermcap(rpm).

I found the solution here

〃温暖了心ぐ 2024-10-08 08:58:41

我执行了

brew uninstall --ignore-dependencies term-readline-gnu-perl
brew install term-readline-gnu-perl

并且成功了。

I executed

brew uninstall --ignore-dependencies term-readline-gnu-perl
brew install term-readline-gnu-perl

and it worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文