【发布时间】:2017-02-09 02:59:57
【问题描述】:
您好,我想通过 cpan 安装一个包,但我收到以下错误:
cpan[1]> install Log::Log4perl
Reading '/home/paulzierep/.cpan/Metadata'
Database was generated on Fri, 30 Sep 2016 06:29:02 GMT
Running install for module 'Log::Log4perl'
Checksum for /home/paulzierep/.cpan/sources/authors/id/M/MS/MSCHILLI/Log-Log4perl-1.47.tar.gz ok
Scanning cache /home/paulzierep/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring M/MS/MSCHILLI/Log-Log4perl-1.47.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Have /usr/lib/x86_64-linux-gnu/perl/5.22.1
Want /usr/lib/x86_64-linux-gnu/perl/5.22
Your perl and your Config.pm seem to have different ideas about the
architecture they are running on.
Perl thinks: [5.22.1]
Config says: [x86_64-linux-gnu-thread-multi]
This may or may not cause problems. Please check your installation of perl
if you have problems building this extension.
Generating a Unix-style Makefile
Writing Makefile for Log::Log4perl
Writing MYMETA.yml and MYMETA.json
MSCHILLI/Log-Log4perl-1.47.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MS/MSCHILLI/Log-Log4perl-1.47.tar.gz
make: *** No rule to make target '/usr/lib/x86_64-linux-gnu/perl/5.22/Config.pm', needed by 'Makefile'. Stop.
MSCHILLI/Log-Log4perl-1.47.tar.gz
/usr/bin/make -- NOT OK
Failed during this command:
MSCHILLI/Log-Log4perl-1.47.tar.gz : make NO
它说要检查我的 perl 安装,即:
perl --version
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)
Copyright 1987-2015, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
这里是@INC:
/usr/lib/x86_64-linux-gnu/perl/5.22.1/ /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base
这就是我得到的:
paulzierep@naproxen:~$ perl -E 'say for @INC'
/etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.22.1
/usr/local/share/perl/5.22.1
/usr/lib/x86_64-linux-gnu/perl5/5.22
/usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.22
/usr/share/perl/5.22
/usr/local/lib/site_perl
/usr/lib/x86_64-linux-gnu/perl-base
.
paulzierep@naproxen:/home$ perl -MFile::Spec -E 'say for File::Spec->path'
/home/paulzierep/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/snap/bin
【问题讨论】:
-
由于这个问题与编程无关,而是与系统配置有关,我建议将此问题提交给 SO 网络上与系统相关的站点之一,例如 unix/linux、serverfault 或(关于那个标签)askubuntu.
-
@syck 这个问题很好。来自help center:“如果您的问题一般涵盖……特定的编程问题,或软件算法,或程序员常用的软件工具;并且是软件独有的实用、可回答的问题发展......那么你来对地方提出你的问题了!”
-
这与你asked about yesterday 因找不到 B.pm 而窒息的 cpan 版本相同吗?如果是这样,你应该edit你的问题来说明你是如何解决这个问题的。
-
@ThisSuitIsBlack 确实不是,事实上我在这里很新,不知道如何编辑 quastion。
-
只需单击问题底部的“编辑”按钮(或我上次评论中的编辑链接)。使用附加信息编辑您的问题是个好主意,因为 cmets 可能会在一段时间后变得笨拙。例如,您可以添加 brian d foy 询问的信息以及指向昨天问题的链接以及对您目前所做工作的解释。
标签: perl cpan ubuntu-16.04