为什么CPAN.pm升级失败?
澄清:我几乎是一个 Perl/CPAN 菜鸟,别以为我知道 太多了。
我有一个非常普通的 CPAN
因为我刚刚重建了整个 Lenny 5.0.2 VPS - 所以我几乎安装了默认模块。
我的最终目标是在基于 Apache 2.x 的服务器上设置 foswiki
。
到目前为止,我正在阅读本指南,它说您应该做的第一件事是将 CPAN 升级到最新版本。所以我做了(如 su
):
# perl -MCPAN -e '$ENV{FTP_PASSIVE} = 1; install CPAN'
现在,它正在安装/更新一堆东西,这里是摘录:
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Expect-1.00.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-UnsatPrereq-1.00.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/ CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CPAN-Test-Dummy-Perl5-Make-Features-1.05.tgz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Zip-1.03.zip CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS.2nd CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-1.05.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Failearly-1.02.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/A/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/CHECKSUMS CPAN-1.9402/t/CPAN/authors/01mailrc.txt CPAN-1.9402/t/CPAN/CpanTestDummies-1.55.pm CPAN-1.9402/t/CPAN/TestConfig.pm CPAN-1.9402/t/51pod.t CPAN-1.9402/t/02nox.t CPAN-1.9402/t/50pod.t CPAN-1.9402/t/10version.t CPAN-1.9402/t/yaml_code.yml CPAN-1.9402/t/04clean_load.t CPAN-1.9402/README CPAN: File::Temp loaded ok (v0.18) CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz Importing PAUSE public key into your GnuPG keychain... gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run done! (You may wish to trust it locally with 'gpg --lsign-key 450F89EC') Checking if your kit is complete... Looks good Writing Makefile for CPAN Could not read '/root/.cpan/build/CPAN-1.9402-fmK7xK/META.yml'. Falling back to other methods to determine prerequisites ANDK/CPAN-1.9402.tar.gz make -- NOT OK Warning (usually harmless): '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 kat:~#
我搜索了 Google,发现一个页面说你应该尽可能从以下位置安装软件包: aptitude/apt-get/yum,所以我找到了一个名为 libyaml-perl 的包,将其标记为下载,一切顺利。
然后我重新尝试了安装最新版本 CPAN 的初始命令,并且...
CPAN-1.9402/t/50pod.t CPAN-1.9402/t/10version.t CPAN-1.9402/t/yaml_code.yml CPAN-1.9402/t/04clean_load.t CPAN-1.9402/README CPAN: File::Temp loaded ok (v0.18) CPAN: YAML loaded ok (v0.66) CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz Importing PAUSE public key into your GnuPG keychain... done! (You may wish to trust it locally with 'gpg --lsign-key 450F89EC') Checking if your kit is complete... Looks good Writing Makefile for CPAN ANDK/CPAN-1.9402.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
不知道我现在应该做什么。有什么办法可以重置一切吗?也许我需要杀死它尝试处理的文件,以便它可以尝试重新处理它或类似的东西?如果其他人除了弄清楚这是什么之外还有一般的 CPAN 技巧,我将不胜感激。
- 我是否以正确的方式安装了 yaml 包?
- 我应该从 CPAN 内部完成吗?
- 我应该首先采取哪些正确的步骤或模块?
最终我需要为 foswiki 安装这些:
- CGI::Session - Foswiki 的会话功能所需,这确实是必须的
- 错误 - 如果您以后想要开发插件则需要。它也与 Foswiki 一起分发,但作者在构建插件的构建脚本方面遇到了很多麻烦,有时无法找到该库。通过将其添加到站点 Perl 库中,您可以避免此类麻烦。
- FreezeThaw - 其他模块使用的间接需要的模块。
- GD - 由可以生成图形的插件使用,例如 Foswiki:Plugins.ChartPlugin。它需要安装 lib gd。如果您选择的安装不包括,您只需安装 rpm gd 和 gd-devel。它们都在 CD 或 DVD 上。
- HTML::Tree - 一些流行插件需要
- 时间模块(Time::CTime、Time::DaysInMonth、Time::JulianDay、Time::ParseDate、Time::Timezone)也被一些流行插件需要。
Clarification: I'm pretty much a
Perl/CPAN noob, don't assume I know
too much.
I have a pretty vanilla CPAN
because I just rebuild my entire Lenny 5.0.2 VPS - so I pretty much have the default modules installed.
My eventual goal is to setup foswiki
on my Apache 2.x based server.
So far I'm reading this guide and it says the first thing you should do is upgrade CPAN to the latest version. So I did (as su
):
# perl -MCPAN -e '$ENV{FTP_PASSIVE} = 1; install CPAN'
Now, it's installing/updating a bunch of stuff, here's an excerpt:
CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Expect-1.00.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-UnsatPrereq-1.00.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/ CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CPAN-Test-Dummy-Perl5-Make-Features-1.05.tgz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/cpantestdummies/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Zip-1.03.zip CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CHECKSUMS.2nd CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-1.05.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/ANDK/CPAN-Test-Dummy-Perl5-Make-Failearly-1.02.tar.gz CPAN-1.9402/t/CPAN/authors/id/A/AN/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/A/CHECKSUMS CPAN-1.9402/t/CPAN/authors/id/CHECKSUMS CPAN-1.9402/t/CPAN/authors/01mailrc.txt CPAN-1.9402/t/CPAN/CpanTestDummies-1.55.pm CPAN-1.9402/t/CPAN/TestConfig.pm CPAN-1.9402/t/51pod.t CPAN-1.9402/t/02nox.t CPAN-1.9402/t/50pod.t CPAN-1.9402/t/10version.t CPAN-1.9402/t/yaml_code.yml CPAN-1.9402/t/04clean_load.t CPAN-1.9402/README CPAN: File::Temp loaded ok (v0.18) CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz Importing PAUSE public key into your GnuPG keychain... gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run done! (You may wish to trust it locally with 'gpg --lsign-key 450F89EC') Checking if your kit is complete... Looks good Writing Makefile for CPAN Could not read '/root/.cpan/build/CPAN-1.9402-fmK7xK/META.yml'. Falling back to other methods to determine prerequisites ANDK/CPAN-1.9402.tar.gz make -- NOT OK Warning (usually harmless): '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 kat:~#
I've searched Google and came across one page that said you should whenever possible install the package from aptitude/apt-get/yum, so I found a package named libyaml-perl
, marked it for download, that went through fine.
Then I re-tried my initial command that installs the latest version of CPAN and ...
CPAN-1.9402/t/50pod.t CPAN-1.9402/t/10version.t CPAN-1.9402/t/yaml_code.yml CPAN-1.9402/t/04clean_load.t CPAN-1.9402/README CPAN: File::Temp loaded ok (v0.18) CPAN: YAML loaded ok (v0.66) CPAN.pm: Going to build A/AN/ANDK/CPAN-1.9402.tar.gz Importing PAUSE public key into your GnuPG keychain... done! (You may wish to trust it locally with 'gpg --lsign-key 450F89EC') Checking if your kit is complete... Looks good Writing Makefile for CPAN ANDK/CPAN-1.9402.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
No clue what I should do now. Is there a way I can reset everything? Maybe I need to kill the file it tried to process so it can try to re-process it or something along those lines? If anyone else has general CPAN tips in addition to figuring out what this is, I'd be grateful.
- Did I install the yaml package the right way?
- Should I have done it from within CPAN?
- What proper steps or modules should I get first?
Eventually I'll need to install these for foswiki:
- CGI::Session - Needed for Foswiki's session feature which is really a must have
- Error - Needed if you later want to develop plugins. It is also distributed with Foswiki but the author has experienced lots of trouble with the build script that builds plugins which sometimes cannot find this library. By adding it to the site Perl library you avoid this kind of trouble.
- FreezeThaw - an indirectly needed module used by other modules.
- GD - Used by the pluging that can produce graphics such as Foswiki:Plugins.ChartPlugin. It requires that lib gd is installed. If your choice of installation does not include you simply need to install the rpms gd and gd-devel. They are both on the CDs or DVD.
- HTML::Tree - Needed by some popular plugins
- Time-modules (Time::CTime, Time::DaysInMonth, Time::JulianDay, Time::ParseDate, Time::Timezone) also needed by some popular plugins.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用 debian 的软件包管理工具进行安装:请参阅 foswiki 网站上的说明。
99% 的时间都坚持使用特定于平台的包管理工具。否则,将 CPAN 配置为安装在单独的目录中(您可以将其添加到
$PERL5LIB
)。Use debian's package management facilities to install: See instructions on the foswiki web site.
Stick with the platform-specific package management tools 99% of the time. Otherwise, configure CPAN to install in a separate directory (which you can add to
$PERL5LIB
).cpan shell 中的
o conf make
说什么?你有安装make吗?一般来说,安装
build-essential
(ubuntu中有,所以Debian中也应该有),然后在cpan shell中执行o conf init
。What does
o conf make
in cpan shell say? Do you have make installed?Generally, install
build-essential
(it's in ubuntu, so it should be also in Debian), and then doo conf init
in cpan shell.