我正在尝试按
安装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.
我在Google上搜索并发现了这个
Devel::CheckLib syntax errors when trying to install Tree::Suffix
转发票据说
捆绑的Devel :: CheckLib使用不推荐使用的“for qw()”语法, 这与perl 5.18.x不再有效。请升级到 较新的Devel :: CheckLib,至少版本0.9。
但我已经在使用了Devel :: CheckLib的1.02版本。我不知道问题在哪里?
我已经安装了以下所有软件包
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
答案 0 :(得分:1)
问题在于X11::Xlib
将Devel::CheckLib
的过时副本与其捆绑在一起 - 如果您检查分发目录,则会inc/Devel/CheckLib.pm
。有几个选择:
Devel::CheckLib
; inc
目录,以便perl使用已安装的Devel :: CheckLib版本use lib qw(inc);
中注释掉Makefile.PL
行以阻止perl在那里查找模块(inc
中没有其他模块)。所有效果都相同,您应该可以继续安装X11::Xlib
不受干扰!