为什么CPAN.pm无法升级?

时间:2009-10-08 18:13:31

标签: perl debian cpan

  澄清:我差不多了   Perl / CPAN noob,不要以为我知道   太多了。

我有一个漂亮的香草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。如果您选择的安装不包括在内,则只需安装rpms gd和gd-devel。它们都在CD或DVD上。
  • HTML :: Tree - 一些流行的插件需要
  • 一些流行的插件也需要时间模块(Time :: CTime,Time :: DaysInMonth,Time :: JulianDay,Time :: ParseDate,Time :: Timezone)。

3 个答案:

答案 0 :(得分:3)

使用debian的软件包管理工具进行安装:请参阅foswiki网站上的instructions

99%的时间坚持使用特定于平台的软件包管理工具。否则,将CPAN配置为安装在单独的目录中(可以添加到$PERL5LIB)。

答案 1 :(得分:2)

cpan shell中的o conf make说什么?你有安装吗?

通常,安装build-essential(它在ubuntu中,因此它也应该在Debian中),然后在cpan shell中执行o conf init

答案 2 :(得分:1)

  1. 考虑使用CPANPLUS(cpanp脚本)代替CPAN。
  2. 在安装任何其他内容之前,请考虑安装YAML。
  3. 考虑将配置设置为遵循先决条件(也就是说,当某个软件包需要一些当前缺少的其他模块时,它将继续安装另一个模块 - 根据需要递归安装。)