【问题标题】:Issues installing Tk module via Cpan通过 Cpan 安装 Tk 模块的问题
【发布时间】:2017-04-12 08:12:10
【问题描述】:

我正在尝试设置一个文本分析软件,该软件需要在 mac os 上运行 perl 模块 Tk 的工作版本。 但是由于某种原因,我无法通过 CPAN 安装它。 我继续输入

sudo perl -MCPAN -e "shell"

然后

install Tk

它运行 make install 过程并以这个错误结束

make[3]: Nothing to be done for `all-am'.
make[2]: Nothing to be done for `all'.
make[2]: *** No rule to make target `test_dynamic'.  Stop.
make[1]: *** [subdirs-test_dynamic] Error 2
make: *** [subdirs-test_dynamic] Error 2
  SREZIC/Tk-804.033.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports SREZIC/Tk-804.033.tar.gz
Running make install
  make test had returned bad status, won't install without force

关于如何解决此问题的任何线索? 我对perl不太熟悉,所以我真的在这里摸索... 任何帮助将不胜感激。 谢谢!

更新

当尝试手动安装模块时,make test 命令给了我这个结果:

"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Tk.bs blib/arch/auto/Tk/Tk.bs 644
cd pTk && make DEFINE="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" OPTIMIZE="-Os" PREFIX="/usr/local" PASTHRU_DEFINE=' ' PASTHRU_INC='-I/usr/X11R6/include -I/usr/local/include/freetype2 '
Manifying 102 pod documents
Manifying 1 pod document
Manifying 2 pod documents
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- X.bs ../../blib/arch/auto/Tk/X/X.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Xlib.bs ../blib/arch/auto/Tk/Xlib/Xlib.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- WinPhoto.bs ../blib/arch/auto/Tk/WinPhoto/WinPhoto.bs 644
Manifying 1 pod document
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Pixmap.bs ../blib/arch/auto/Tk/Pixmap/Pixmap.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- TixGrid.bs ../blib/arch/auto/Tk/TixGrid/TixGrid.bs 644
Manifying 1 pod document
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Text.bs ../blib/arch/auto/Tk/Text/Text.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- TList.bs ../blib/arch/auto/Tk/TList/TList.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Scrollbar.bs ../blib/arch/auto/Tk/Scrollbar/Scrollbar.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Scale.bs ../blib/arch/auto/Tk/Scale/Scale.bs 644
cd zlib && make libz.a "CC=cc  " RANLIB="/usr/bin/ar s"
make[2]: `libz.a' is up to date.
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[3]: Nothing to be done for `all-am'.
make[2]: Nothing to be done for `all'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- PNG.bs ../blib/arch/auto/Tk/PNG/PNG.bs 644
Manifying 1 pod document
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- NBFrame.bs ../blib/arch/auto/Tk/NBFrame/NBFrame.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Mwm.bs ../blib/arch/auto/Tk/Mwm/Mwm.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Menubutton.bs ../blib/arch/auto/Tk/Menubutton/Menubutton.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Listbox.bs ../blib/arch/auto/Tk/Listbox/Listbox.bs 644
cd jpeg && make libjpeg.a
make[2]: `libjpeg.a' is up to date.
make[2]: Nothing to be done for `all'.
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- JPEG.bs ../blib/arch/auto/Tk/JPEG/JPEG.bs 644
Manifying 1 pod document
Manifying 1 pod document
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- InputO.bs ../blib/arch/auto/Tk/InputO/InputO.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- IO.bs ../blib/arch/auto/Tk/IO/IO.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- HList.bs ../blib/arch/auto/Tk/HList/HList.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Event.bs ../blib/arch/auto/Tk/Event/Event.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Entry.bs ../blib/arch/auto/Tk/Entry/Entry.bs 644
Manifying 3 pod documents
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Compound.bs ../blib/arch/auto/Tk/Compound/Compound.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Canvas.bs ../blib/arch/auto/Tk/Canvas/Canvas.bs 644
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- PNG.bs ../blib/arch/auto/Tk/PNG/PNG.bs 644
cd zlib && make libz.a "CC=cc  " RANLIB="/usr/bin/ar s"
make[2]: `libz.a' is up to date.
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[3]: Nothing to be done for `all-am'.
make[2]: Nothing to be done for `all'.
make[2]: *** No rule to make target `test_dynamic'.  Stop.
make[1]: *** [subdirs-test_dynamic] Error 2
make: *** [subdirs-test_dynamic] Error 2

【问题讨论】:

  • 您能否提供更多错误消息中的行?
  • 感谢您的回复。我正在使用 make test 命令的完整日志更新我的初始帖子。
  • 嗨 Gauthier。感谢更新。不幸的是,我对 mac os 不太熟悉,我主要使用 Linux。但是我有一台旧的 mac,我现在尝试在它上面安装 Tk 以获得乐趣。但是,我遇到了this issue..希望您能得到更熟悉mac os的人的帮助。
  • 可能与rt.cpan.org/Public/Bug/Display.html?id=106958 有关,我不得不禁用测试才能让 Tk 安装在各种平台上。

标签: macos perl tk cpan


【解决方案1】:

手动尝试,如文件 INSTALL 中所述:
- 从 CPAN 下载 Tkxxxxxx.tar.gz
-zcat Tkxxxxx.tar.gz |焦油 xf -
- cd 到目录分发解压到。
- perl Makefile.PL
- 制作
- 进行测试
如果一切正常,则 sudo make install

【讨论】:

  • 感谢您的帮助 :-) 不幸的是,我在此过程中也遇到了完全相同的错误...
  • 什么都没建?
  • 找到 . -iname '*.so' -exec ls -l {} \;
  • perl -Mblib basic_demo
  • 好吧,我运行了 make test 并显示了相同的错误。关于您的建议,当模块目录中没有基本的演示文件时,我不明白您告诉我该怎么做。文件已创建,但由于某种原因,与我安装的其他模块不同,它没有经过安装过程。
猜你喜欢
  • 2014-12-06
  • 2011-09-29
  • 1970-01-01
  • 2015-10-02
  • 2015-03-27
  • 2016-02-11
  • 1970-01-01
  • 2016-07-08
  • 2018-06-19
相关资源
最近更新 更多