gpt4 book ai didi

perl - X11::Xlib 模块安装在 Devel/CheckLib.pm 出现语法错误

转载 作者:行者123 更新时间:2023-12-04 18:32:25 42 4
gpt4 key购买 nike

我正在尝试安装 WWW::WebKit经过
cpanm WWW::WebKit
但是当它尝试安装 X11::Xlib依赖它失败。

请参阅下面的错误日志。

syntax error at inc/Devel/CheckLib.pm line 164, near "$mm_attr_key qw(LIBS INC)"
syntax error at inc/Devel/CheckLib.pm line 171, near "}"
Global symbol "%args" requires explicit package name at inc/Devel/CheckLib.pm line 175.
syntax error at inc/Devel/CheckLib.pm line 179, near "}"
syntax error at inc/Devel/CheckLib.pm line 185, near "}"
Global symbol "@headers" requires explicit package name at inc/Devel/CheckLib.pm line 192.
Global symbol "@libs" requires explicit package name at inc/Devel/CheckLib.pm line 223.
Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 230.
Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 236.
Global symbol "@libpaths" requires explicit package name at inc/Devel/CheckLib.pm line 240.
syntax error at inc/Devel/CheckLib.pm line 252, near "}"
inc/Devel/CheckLib.pm has too many errors.
Compilation failed in require at Makefile.PL line 8.
BEGIN failed--compilation aborted at Makefile.PL line 8.
-> N/A
-> FAIL Configure failed for X11-Xlib-0.02. See /home/chankey/.cpanm/work/1412186280.51492/build.log for details.
-> FAIL Installing the dependencies failed: Module 'X11::Xlib' is not installed
-> FAIL Bailing out the installation for WWW-WebKit-0.06.

我在谷歌上搜索并找到了这个

Devel::CheckLib syntax errors when trying to install Tree::Suffix

RT票说

The bundled Devel::CheckLib uses the deprecated "for qw()" syntax, which does not work anymore with perl 5.18.x. Please upgrade to a newer Devel::CheckLib, at least version 0.9.



但我已经在使用 1.02 版的 Devel::CheckLib。我不明白问题出在哪里?

我已经安装了以下所有软件包
sudo apt-get install libx11-dev 
sudo apt-get install mesa-common-dev
sudo apt-get install libglu1-mesa-dev
sudo apt-get install libxrandr-dev
sudo apt-get install libxi-dev

最佳答案

问题是 X11::Xlib捆绑 Devel::CheckLib 的过期副本有了它 - 如果你检查分发目录,它在 inc/Devel/CheckLib.pm .有几个选择:

  • 更正 Devel::CheckLib 副本的代码中的错误;
  • 删除整个 inc目录,以便 perl 使用已安装的 Devel::CheckLib
  • 版本
  • 注释掉 use lib qw(inc); 行在 Makefile.PL阻止 perl 在那里寻找模块(inc 中没有其他模块)。

  • 都具有相同的效果,您应该可以继续安装 X11::Xlib不受打扰!

    关于perl - X11::Xlib 模块安装在 Devel/CheckLib.pm 出现语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26147692/

    42 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com