简体   繁体   English

为什么CPAN.pm无法升级?

[英]Why does CPAN.pm fail to upgrade?

Clarification: I'm pretty much a Perl/CPAN noob, don't assume I know too much. 澄清:我几乎是一个Perl / CPAN菜鸟,不要以为我知道的太多了。

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. 我有一个漂亮的香草CPAN因为我只是重建我的整个Lenny 5.0.2 VPS - 所以我几乎安装了默认模块。

My eventual goal is to setup foswiki on my Apache 2.x based server. 我最终的目标是在基于Apache 2.x的服务器上设置foswiki

So far I'm reading this guide and it says the first thing you should do is upgrade CPAN to the latest version. 到目前为止,我正在阅读本指南,它说你应该做的第一件事是将CPAN升级到最新版本。 So I did (as su ): 所以我做了(作为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. 我搜索了谷歌,并且遇到了一个页面,说你应该尽可能从aptitude / apt-get / yum安装软件包,所以我找到了一个名为libyaml-perl的软件包,标记为下载,结果很好。

Then I re-tried my initial command that installs the latest version of CPAN and ... 然后我重新尝试了我的初始命令,安装最新版本的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

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. 如果除了弄清楚这是什么之外还有其他人有CPAN的一般提示,我将不胜感激。

  • Did I install the yaml package the right way? 我是否以正确的方式安装了yaml包?
  • Should I have done it from within CPAN? 我应该在CPAN内完成吗?
  • What proper steps or modules should I get first? 我应该先获得哪些适当的步骤或模块?

Eventually I'll need to install these for foswiki: 最终我需要为foswiki安装这些:

  • CGI::Session - Needed for Foswiki's session feature which is really a must have CGI :: Session - 需要Foswiki的会话功能,这是必须的
  • 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. 它也与Foswiki一起发布,但作者在构建插件时遇到了很多麻烦,这些插件有时无法找到这个库。 By adding it to the site Perl library you avoid this kind of trouble. 通过将其添加到站点Perl库,您可以避免这种麻烦。
  • FreezeThaw - an indirectly needed module used by other modules. FreezeThaw - 其他模块使用的间接需要的模块。
  • GD - Used by the pluging that can produce graphics such as Foswiki:Plugins.ChartPlugin. GD - 用于生成图形的插件,如Foswiki:Plugins.ChartPlugin。 It requires that lib gd is installed. 它要求安装lib gd。 If your choice of installation does not include you simply need to install the rpms gd and gd-devel. 如果您选择的安装不包括在内,则只需安装rpms gd和gd-devel。 They are both on the CDs or DVD. 它们都在CD或DVD上。
  • HTML::Tree - Needed by some popular plugins HTML :: Tree - 一些流行的插件需要
  • Time-modules (Time::CTime, Time::DaysInMonth, Time::JulianDay, Time::ParseDate, Time::Timezone) also needed by some popular plugins. 一些流行的插件也需要时间模块(Time :: CTime,Time :: DaysInMonth,Time :: JulianDay,Time :: ParseDate,Time :: Timezone)。

Use debian's package management facilities to install: See instructions on the foswiki web site. 使用Debian的软件包管理工具来安装:见说明在foswiki网站。

Stick with the platform-specific package management tools 99% of the time. 99%的时间坚持使用特定于平台的包管理工具。 Otherwise, configure CPAN to install in a separate directory (which you can add to $PERL5LIB ). 否则,将CPAN配置为安装在单独的目录中(可以添加到$PERL5LIB )。

What does o conf make in cpan shell say? o conf make在cpan shell中o conf make了什么? Do you have make installed? 你有安装吗?

Generally, install build-essential (it's in ubuntu, so it should be also in Debian), and then do o conf init in cpan shell. 通常,安装build-essential (它在ubuntu中,因此它也应该在Debian中),然后在cpan shell中执行o conf init

  1. Consider using CPANPLUS (cpanp script) instead of CPAN. 考虑使用CPANPLUS(cpanp脚本)而不是CPAN。
  2. Consider installing YAML before installing anything else. 考虑在安装其他任何东西之前安装YAML。
  3. Consider setting the configuration to follow prerequisites (that is, when some package requires some other module that is currently missing, it will go ahead and install the other module - recursively as necessary). 考虑将配置设置为遵循先决条件(也就是说,当某个包需要一些当前缺少的其他模块时,它将继续安装另一个模块 - 根据需要递归安装)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM