我需要Digest::SHA1
来获取我想在cygwin上运行的Perl脚本。但是,我必须使用CPAN进行配置。一切似乎都很好,直到我运行cpan[1]> install Digest::SHA1
。 东西下去,接着,我以下错误:在cygwin上安装Perl模块(make failed)
/bin/sh: gcc-4: command not found
Makefile:327: recipe for target `SHA1.o' failed
make: * [SHA1.o] Error 127
GAAS/Digest-SHA1-2.13.tar.gz
/usr/bin/make -- NOT OK
'YAML' not installed, will not store persistent state
Running make test
Can't test without successful make Running make install
Make had returned bad status, install seems impossible
Failed during this command:
GAAS/Digest-SHA1-2.13.tar.gz : make NO
好像我必须安装GCC4。 make错误并不是因为它的路径,因为它的设置正确(CPAN中的o conf make
返回/usr/bin/make
,并且我安装了make
的二进制文件)。不幸的是,cygwin不提供gcc4软件包(它被标记为过时的软件包)。有没有解决这个问题的解决方法?或者有没有办法可以在cygwin下编译gcc4,因为只需在Makefile
中简单地链接gcc-4
至gcc
即可。
我在目录中有'cd''d,然后运行'perl Makefile.PL CC =/usr/bin/gcc'。然后编写'Makefile','MYMETA.yml'也一样。 'make install'给了我下面的输出:http://pastebin.com/jgnKLnXB。有任何想法吗? – arnaudoff
链接器也需要更改。我已经更新了上面的答案。也请运行'make test',这很重要!它会立即告诉你这个小实验是否奏效。如果有效,你可以[改变CPAN配置'makepl_arg'和'mbuildpl_arg'](http://p3rl.org/CPAN#Config-Variables)使其成为永久的。 – daxim