2013-05-30 98 views
8

在尝试git add -i导致以下错误,当(1.8.1.2)错误:Git的交互方式将

Can't locate Error.pm in @INC (@INC contains: /usr/share/perl/5.14.2 
/etc/perl 
/usr/local/lib/perl/5.14.2 
/usr/local/share/perl/5.14.2 
/usr/lib/perl5 
/usr/share/perl5 
/usr/lib/perl/5.14 
/usr/share/perl/5.14 
/usr/local/lib/site_perl 
.) at /usr/share/perl5/Git.pm line 101. 

BEGIN failed--compilation aborted at /usr/share/perl5/Git.pm line 101. 
Compilation failed in require at /usr/lib/git-core/git-add--interactive line 7. 
BEGIN failed--compilation aborted at /usr/lib/git-core/git-add--interactive line 7. 

我已经在所有添加文件手动或任何其他git的操作过程中,没有任何问题是Perl是不是找到Error.pm的正确版本,或者它没有附带我的git软件包。

我还没有尝试在一段时间内做一个交互式添加,所以我不能说这是什么时候开始的。

回答

7

我解决了这个通过执行以下(使用cpanm,但是CPAN将工作以及):cpanm Error.pm

+2

@uDaY显然,我必须等待2天才能接受我自己的回答。 –

+0

s/be'cpan Error.pm'? – cerberos

+0

@cerberos是的,无论是用'cpan'还是'cpanm',只要你安装了Error.pm就可以再次工作。 :-) –

9

接受的答案并不在我的情况下工作,然而,这条命令做了:

sudo perl -MCPAN -e 'install Error'

here。在CentOS release 5.9 (Final)上运行

+0

cpnanm失败,需要“Module :: Build版本0.39 - 这仅仅是./Build第43行的0.38版本。” - > FAIL安装错误失败,详情请参阅〜/ .cpanm/build.log。这个工作得很好。 – user656449

+0

'在/usr/lib/perl5/5.14/File/Basename.pm行341的替换(s ///)中使用未初始化值$ _ [0]。'拥有另一个伟大的日子〜 –

+3

在CentOS上,您需要安装(缺少)依赖项'perl-Error'(即:'yum install -y perl-Error'和你的'git add -p'将会工作)。 – bufh