Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3049378
  • 博文数量: 535
  • 博客积分: 15788
  • 博客等级: 上将
  • 技术积分: 6507
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-07 09:11
文章分类

全部博文(535)

文章存档

2016年(1)

2015年(1)

2014年(10)

2013年(26)

2012年(43)

2011年(86)

2010年(76)

2009年(136)

2008年(97)

2007年(59)

分类: Python/Ruby

2009-03-19 13:48:23

If you are missing any of these, you can try running

    perl -MCPAN -e shell

或: echo "install DateTime"|perl -MCPAN -e shell 
或:perl -MCPAN -e"install XML::Simple"
一句搞定,注意替换红色部分为你要装的模块

If you haven't run this before, it will ask you a series of configuration
questions.  The defaults are usually fine.

Once everything is configured, type:

install [package-name]

for each dependency.  Please say 'yes' to install all dependencies of these
dependencies.  Also, if the tests fail, you might try

force install [package-name]

which will ignore the test results.  This isn't a very pretty solution, but it
might be necessary on some platforms.

Also, there have been reports that CPAN on OS X does not work well with ftp
mirrors (perhaps due to OS X's firewall rules).  Choosing an http mirror will
solve this.  If you've already configured CPAN to use an ftp mirror, do the following:

1) Find /usr/lib/perl5/5.8.8/CPAN/Config.pm  One of these is where CPAN is configured.

2) Find an HTTP mirror on this page:

3) Replace the urllist parameter so that it looks something like this:


4) Try running install [package-name] again.



LWP timout?
You can set the FTP_PASSIVE environment variable before invoking CPAN:
export FTP_PASSIVE=1
阅读(1134) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~