我正在尝试建立一个文本分析软件,需要在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
答案 0 :(得分:0)
手动尝试,如文件INSTALL所述:
- 从CPAN下载Tkxxxxxx.tar.gz
- zcat Tkxxxxx.tar.gz | tar xf -
- cd到目录分发解包到。
- perl Makefile.PL
- 制作
- 进行测试
如果一切正常,那么sudo make install