免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5026 | 回复: 12
打印 上一主题 下一主题

求助:安装perl模块支持SSH失败怎么办 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-02-17 17:28 |只看该作者 |倒序浏览
本帖最后由 sallyzheng918 于 2012-02-21 11:29 编辑

在cygwin下安装perl 的Expect模块:
使用cygwin的setup安装后运行脚本仍提示模块没有安装,使用$ perl -MCPAN -e 'install Expect'安装,一路next最后提示:
Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...

ERROR: cannot run the configured compiler 'gcc-4'
(see conf/compilerok.log). Suggestions:
1) The complier 'gcc-4' is not in your PATH. Add it
   to the PATH and try again. OR
2) The compiler isn't installed on your system. Install it. OR
3) You only have a different compiler installed (e.g. 'gcc').
   Either fix the compiler config in the perl Config.pm
   or install a perl that was built with the right compiler
   (you could build perl yourself with the available compiler).

Note: this is a system-administration issue, please ask your local
admin for help. Thank you.

Warning: No success on command[/usr/bin/perl Makefile.PL]
  TODDR/IO-Tty-1.10.tar.gz
  /usr/bin/perl Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Running install for module 'IO::Tty'
Running make for T/TO/TODDR/IO-Tty-1.10.tar.gz
  Has already been unwrapped into directory /home/sallyzheng/.cpan/build/IO-Tty-1.10-gjEZSh
  '/usr/bin/perl Makefile.PL' returned status 512, won't make
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Running make for R/RG/RGIERSIG/Expect-1.21.tar.gz
  Has already been unwrapped into directory /home/sallyzheng/.cpan/build/Expect-1.21-DVqn8t

  CPAN.pm: Going to build R/RG/RGIERSIG/Expect-1.21.tar.gz

Warning: Prerequisite 'IO:ty => 1.03' for 'RGIERSIG/Expect-1.21.tar.gz' failed when processing 'TODDR/IO-Tty-1.10.tar.gz' with 'writemakefile => NO '/usr/bin/perl Makefile.PL' returned status 512'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'IO::Tty => 1.03' for 'RGIERSIG/Expect-1.21.tar.gz' failed when processing 'TODDR/IO-Tty-1.10.tar.gz' with 'writemakefile => NO '/usr/bin/perl Makefile.PL' returned status 512'. Continuing, but chances to succeed are limited.
  RGIERSIG/Expect-1.21.tar.gz
  make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
是什么问题呢,该如何解决?我是菜鸟,诚信求助。谢谢。

论坛徽章:
0
2 [报告]
发表于 2012-02-18 12:15 |只看该作者

ERROR: cannot run the configured compiler 'gcc-4'
(see conf/compilerok.log). Suggestions:

这个不是写出来了么?你没有装GCC

论坛徽章:
0
3 [报告]
发表于 2012-02-20 10:23 |只看该作者
使用$ perl -MCPAN 不是会将所需的恶相关模块自动安装吗? 还需要手动安装?

论坛徽章:
46
15-16赛季CBA联赛之四川
日期:2018-03-27 11:59:132015年亚洲杯之沙特阿拉伯
日期:2015-04-11 17:31:45天蝎座
日期:2015-03-25 16:56:49双鱼座
日期:2015-03-25 16:56:30摩羯座
日期:2015-03-25 16:56:09巳蛇
日期:2015-03-25 16:55:30卯兔
日期:2015-03-25 16:54:29子鼠
日期:2015-03-25 16:53:59申猴
日期:2015-03-25 16:53:29寅虎
日期:2015-03-25 16:52:29羊年新春福章
日期:2015-03-25 16:51:212015亚冠之布里斯班狮吼
日期:2015-07-13 10:44:56
4 [报告]
发表于 2012-02-20 10:39 |只看该作者
sallyzheng918 发表于 2012-02-20 10:23
使用$ perl -MCPAN 不是会将所需的恶相关模块自动安装吗? 还需要手动安装?


很遗憾目前还没有可用的 Perl 写的 C 编译器,所以只能借用 GCC。而 GCC 是可执行程序,下载下来代码你难道手工编译

论坛徽章:
46
15-16赛季CBA联赛之四川
日期:2018-03-27 11:59:132015年亚洲杯之沙特阿拉伯
日期:2015-04-11 17:31:45天蝎座
日期:2015-03-25 16:56:49双鱼座
日期:2015-03-25 16:56:30摩羯座
日期:2015-03-25 16:56:09巳蛇
日期:2015-03-25 16:55:30卯兔
日期:2015-03-25 16:54:29子鼠
日期:2015-03-25 16:53:59申猴
日期:2015-03-25 16:53:29寅虎
日期:2015-03-25 16:52:29羊年新春福章
日期:2015-03-25 16:51:212015亚冠之布里斯班狮吼
日期:2015-07-13 10:44:56
5 [报告]
发表于 2012-02-20 10:39 |只看该作者
应该叫人肉编译

论坛徽章:
46
15-16赛季CBA联赛之四川
日期:2018-03-27 11:59:132015年亚洲杯之沙特阿拉伯
日期:2015-04-11 17:31:45天蝎座
日期:2015-03-25 16:56:49双鱼座
日期:2015-03-25 16:56:30摩羯座
日期:2015-03-25 16:56:09巳蛇
日期:2015-03-25 16:55:30卯兔
日期:2015-03-25 16:54:29子鼠
日期:2015-03-25 16:53:59申猴
日期:2015-03-25 16:53:29寅虎
日期:2015-03-25 16:52:29羊年新春福章
日期:2015-03-25 16:51:212015亚冠之布里斯班狮吼
日期:2015-07-13 10:44:56
6 [报告]
发表于 2012-02-20 10:43 |只看该作者
sallyzheng918 发表于 2012-02-20 10:23
使用$ perl -MCPAN 不是会将所需的恶相关模块自动安装吗? 还需要手动安装?

1) The complier 'gcc-4' is not in your PATH. Add it
   to the PATH and try again
. OR
2) The compiler isn't installed on your system. Install it. OR
3) You only have a different compiler installed (e.g. 'gcc').
   Either fix the compiler config in the perl Config.pm
   or install a perl that was built with the right compiler
   (you could build perl yourself with the available compiler).

论坛徽章:
0
7 [报告]
发表于 2012-02-20 11:08 |只看该作者
我手动安装了gcc-4,上面的警告不出了,但安装任然有错误:
$ perl -MCPAN -e 'install Expect'
CPAN: Storable loaded ok (v2.20)
Going to read '/home/Administrator/.cpan/Metadata'
  Database was generated on Mon, 20 Feb 2012 02:12:42 GMT
Running install for module 'Expect'
CPAN: YAML loaded ok (v0.71)
Running make for R/RG/RGIERSIG/Expect-1.21.tar.gz
CPAN: Digest::SHA loaded ok (v5.47)
CPAN: Compress::Zlib loaded ok (v2.02)
Checksum for /home/Administrator/.cpan/sources/authors/id/R/RG/RGIERSIG/Expect-1.21.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.52)
Expect-1.21/
Expect-1.21/Changes
Expect-1.21/examples/
Expect-1.21/examples/kibitz/
Expect-1.21/examples/kibitz/Changelog
Expect-1.21/examples/kibitz/kibitz
Expect-1.21/examples/kibitz/kibitz.man
Expect-1.21/examples/kibitz/README
Expect-1.21/examples/ssh.pl
Expect-1.21/Expect.pm
Expect-1.21/Expect.pod
Expect-1.21/Makefile.PL
Expect-1.21/MANIFEST
Expect-1.21/META.yml
Expect-1.21/README
Expect-1.21/test.pl
Expect-1.21/tutorial/
Expect-1.21/tutorial/1.A.Intro
Expect-1.21/tutorial/2.A.ftp
Expect-1.21/tutorial/2.B.rlogin
Expect-1.21/tutorial/3.A.debugging
Expect-1.21/tutorial/4.A.top
Expect-1.21/tutorial/5.A.top
Expect-1.21/tutorial/5.B.top
Expect-1.21/tutorial/6.A.smtp-verify
Expect-1.21/tutorial/6.B.modem-init
Expect-1.21/tutorial/README
CPAN: File::Temp loaded ok (v0.22)

  CPAN.pm: Going to build R/RG/RGIERSIG/Expect-1.21.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite IO:ty 1.03 not found.
Warning: prerequisite IO::Tty 1.03 not found.
Writing Makefile for Expect
---- Unsatisfied dependencies detected during ----
----        RGIERSIG/Expect-1.21.tar.gz       ----
    IO:ty [requires]
    IO::Tty [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Running make test
  Delayed until after prerequisites
Running make install
  Delayed until after prerequisites
Running install for module 'IO:ty'
Running make for T/TO/TODDR/IO-Tty-1.10.tar.gz
Checksum for /home/Administrator/.cpan/sources/authors/id/T/TO/TODDR/IO-Tty-1.10.tar.gz ok
IO-Tty-1.10/
IO-Tty-1.10/ChangeLog
IO-Tty-1.10/MANIFEST
IO-Tty-1.10/META.yml
IO-Tty-1.10/Makefile.PL
IO-Tty-1.10/Pty.pm
IO-Tty-1.10/README
IO-Tty-1.10/Tty.pm
IO-Tty-1.10/Tty.xs
IO-Tty-1.10/t/
IO-Tty-1.10/t/test.t
IO-Tty-1.10/try

  CPAN.pm: Going to build T/TO/TODDR/IO-Tty-1.10.tar.gz

Now let's see what we can find out about your system
(logfiles of failing tests are available in the conf/ dir)...
Looking for _getpty()...... not found.
Looking for getpt()........ FOUND.
Looking for grantpt()...... FOUND.
Looking for openpty()...... FOUND.
Looking for posix_openpt(). FOUND.
Looking for ptsname()...... FOUND.
Looking for ptsname_r().... FOUND.
Looking for sigaction().... FOUND.
Looking for strlcpy()...... FOUND.
Looking for ttyname()...... FOUND.
Looking for unlockpt()..... FOUND.
Looking for libutil.h...... not found.
Looking for pty.h.......... FOUND.
Looking for sys/pty.h...... not found.
Looking for sys/ptyio.h.... not found.
Looking for sys/stropts.h.. not found.
Looking for termio.h....... FOUND.
Looking for termios.h...... FOUND.
Looking for util.h......... not found.
Checking which symbols compile OK...
(sorry for the tedious check, but some systems have not too clean
header files, to say the least;  '+' means OK, '-' means not defined
and '*' has compile problems...)
+B0 +B110 +B115200 +B1200 +B134 +B150 -B153600 +B1800 +B19200 +B200 +B230400 +B2400 +B300 -B307200 +B38400 +B460800 +B4800 +B50 +B57600 +B600 +B75 -B76800 +B9600 +BRKINT +BS0 +BS1 +BSDLY +CBAUD -CBAUDEXT -CBRK -CCTS_OFLOW +CDEL +CDSUSP +CEOF +CEOL +CEOL2 +CEOT +CERASE +CESC +CFLUSH -CIBAUD -CIBAUDEXT +CINTR +CKILL +CLNEXT +CLOCAL -CNSWTCH +CNUL +CQUIT +CR0 +CR1 +CR2 +CR3 +CRDLY +CREAD +CRPRNT +CRTSCTS +CRTSXOFF -CRTS_IFLOW +CS5 +CS6 +CS7 +CS8 +CSIZE +CSTART +CSTOP +CSTOPB +CSUSP +CSWTCH +CWERASE -DEFECHO -DIOC -DIOCGETP -DIOCSETP -DOSMODE +ECHO +ECHOCTL +ECHOE +ECHOK +ECHOKE +ECHONL -ECHOPRT -EXTA -EXTB +FF0 +FF1 +FFDLY -FIORDCHK +FLUSHO +HUPCL +ICANON +ICRNL +IEXTEN +IGNBRK +IGNCR +IGNPAR +IMAXBEL +INLCR +INPCK +ISIG +ISTRIP +IUCLC +IXANY +IXOFF +IXON -KBENABLED -LDCHG -LDCLOSE -LDDMAP -LDEMAP -LDGETT -LDGMAP -LDIOC -LDNMAP -LDOPEN -LDSETT -LDSMAP -LOBLK +NCCS +NL0 +NL1 +NLDLY +NOFLSH +OCRNL +OFDEL +OFILL +OLCUC +ONLCR +ONLRET +ONOCR +OPOST -PAGEOUT +PARENB -PAREXT +PARMRK +PARODD -PENDIN -RCV1EN -RTS_TOG +TAB0 +TAB1 +TAB2 +TAB3 +TABDLY -TCDSET +TCFLSH +TCGETA -TCGETS +TCIFLUSH +TCIOFF +TCIOFLUSH +TCION +TCOFLUSH +TCOOFF +TCOON +TCSADRAIN +TCSAFLUSH +TCSANOW -TCSBRK +TCSETA +TCSETAF +TCSETAW -TCSETCTTY -TCSETS -TCSETSF -TCSETSW -TCXONC -TERM_D40 -TERM_D42 -TERM_H45 -TERM_NONE -TERM_TEC -TERM_TEX -TERM_V10 -TERM_V61 +TIOCCBRK -TIOCCDTR -TIOCCONS -TIOCEXCL -TIOCFLUSH -TIOCGETC -TIOCGETD -TIOCGETP -TIOCGLTC +TIOCGPGRP -TIOCGSID -TIOCGSOFTCAR +TIOCGWINSZ -TIOCHPCL -TIOCKBOF -TIOCKBON -TIOCLBIC -TIOCLBIS -TIOCLGET -TIOCLSET +TIOCMBIC +TIOCMBIS +TIOCMGET +TIOCMSET +TIOCM_CAR +TIOCM_CD +TIOCM_CTS +TIOCM_DSR +TIOCM_DTR -TIOCM_LE +TIOCM_RI +TIOCM_RNG +TIOCM_RTS -TIOCM_SR -TIOCM_ST -TIOCNOTTY -TIOCNXCL -TIOCOUTQ -TIOCREMOTE +TIOCSBRK +TIOCSCTTY -TIOCSDTR -TIOCSETC -TIOCSETD -TIOCSETN -TIOCSETP -TIOCSIGNAL -TIOCSLTC +TIOCSPGRP -TIOCSSID -TIOCSSOFTCAR -TIOCSTART -TIOCSTI -TIOCSTOP +TIOCSWINSZ -TM_ANL -TM_CECHO -TM_CINVIS -TM_LCF -TM_NONE -TM_SET -TM_SNL +TOSTOP -VCEOF -VCEOL +VDISCARD -VDSUSP +VEOF +VEOL +VEOL2 +VERASE +VINTR +VKILL +VLNEXT +VMIN +VQUIT +VREPRINT +VSTART +VSTOP +VSUSP -VSWTCH +VT0 +VT1 +VTDLY +VTIME +VWERASE -WRAP -XCASE -XCLUDE -XMT1EN +XTABS

>>> Configuration looks good! <<<

Writing IO::Tty::Constant.pm...
DEFINE = -DHAVE_CYGWIN -DHAVE_DEV_PTMX -DHAVE_GETPT -DHAVE_GRANTPT -DHAVE_OPENPTY -DHAVE_POSIX_OPENPT -DHAVE_PTSNAME -DHAVE_PTSNAME_R -DHAVE_PTY_H -DHAVE_SIGACTION -DHAVE_STRLCPY -DHAVE_TERMIOS_H -DHAVE_TERMIO_H -DHAVE_TTYNAME -DHAVE_UNLOCKPT
Checking if your kit is complete...
Looks good
Writing Makefile for IO::Tty
  TODDR/IO-Tty-1.10.tar.gz
  make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Running install for module 'IO::Tty'
Running make for T/TO/TODDR/IO-Tty-1.10.tar.gz
  Has already been unwrapped into directory /home/Administrator/.cpan/build/IO-Tty-1.10-lTU7Q_
Could not make: Unknown error
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible
Running make for R/RG/RGIERSIG/Expect-1.21.tar.gz
  Has already been unwrapped into directory /home/Administrator/.cpan/build/Expect-1.21-l75rWU

  CPAN.pm: Going to build R/RG/RGIERSIG/Expect-1.21.tar.gz

Warning: Prerequisite 'IO:ty => 1.03' for 'RGIERSIG/Expect-1.21.tar.gz' failed when processing 'TODDR/IO-Tty-1.10.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
CPAN: Time::HiRes loaded ok (v1.9719)
Warning: Prerequisite 'IO::Tty => 1.03' for 'RGIERSIG/Expect-1.21.tar.gz' failed when processing 'TODDR/IO-Tty-1.10.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
  RGIERSIG/Expect-1.21.tar.gz
  make -- NOT OK
Running make test
  Can't test without successful make
Running make install
  Make had returned bad status, install seems impossible

手动安装IO:ty和IO::Tty问题一样,怎么办呢?求助各位大侠。

论坛徽章:
0
8 [报告]
发表于 2012-02-20 11:23 |只看该作者
本帖最后由 sallyzheng918 于 2012-02-20 11:24 编辑

我安装Expect是为了使用SSH向服务器发送配置命令,我也试着安装了$ perl -MCPAN -e 'install Net::SSH:erl',同样安装不上。急,求助。

论坛徽章:
46
15-16赛季CBA联赛之四川
日期:2018-03-27 11:59:132015年亚洲杯之沙特阿拉伯
日期:2015-04-11 17:31:45天蝎座
日期:2015-03-25 16:56:49双鱼座
日期:2015-03-25 16:56:30摩羯座
日期:2015-03-25 16:56:09巳蛇
日期:2015-03-25 16:55:30卯兔
日期:2015-03-25 16:54:29子鼠
日期:2015-03-25 16:53:59申猴
日期:2015-03-25 16:53:29寅虎
日期:2015-03-25 16:52:29羊年新春福章
日期:2015-03-25 16:51:212015亚冠之布里斯班狮吼
日期:2015-07-13 10:44:56
9 [报告]
发表于 2012-02-20 12:07 |只看该作者
sallyzheng918 发表于 2012-02-20 11:23
我安装Expect是为了使用SSH向服务器发送配置命令,我也试着安装了$ perl -MCPAN -e 'install Net::SSH:er ...


来这儿的我还没见过有谁在 win 下搞定 Expect 和 Net::SSH:erl 的,你装个虚拟机都比这快

论坛徽章:
0
10 [报告]
发表于 2012-02-20 14:01 |只看该作者
这样啊,悲剧了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP