无法在 @INC ... 中找到 MIME/Types.pm 在 /usr/local/share/perl/5.10.1/Dancer/MIME.pm 第 7 行
我对编程很陌生,所以如果我错过了一些明显的事情,我深表歉意。
我正在按照 https://github.com/keeth/Net- 的指示进行操作OAuth/blob/master/README 并收到以下错误:
Can't locate MIME/Types.pm in @INC
(@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.1/Dancer/MIME.pm line 7.
听起来 perl 模块 Dancer/MIME.pm
中存在错误?如果是这样,我不知道如何调试它。
附录:更多错误消息。
$ ./mayor-emanuel.pl Can't locate HTTP/Body.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
/usr/local/share/perl/5.10.1/Dancer/Request.pm line 12. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer/Request.pm line 12. Compilation failed in require at
/usr/local/share/perl/5.10.1/Dancer/Route.pm line 11. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer/Route.pm line 11. Compilation failed in require at
/usr/local/share/perl/5.10.1/Dancer/Route/Registry.pm line 5. BEGIN failed--compilation
aborted at /usr/local/share/perl/5.10.1/Dancer/Route/Registry.pm line 5. Compilation failed
in require at /usr/local/.../Dancer/App.pm line 10. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer/App.pm line 10. Compilation failed in require at
/usr/local/share/.../Dancer.pm line 13. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer.pm line 13. Compilation failed in require at ./mayor-
emanuel.pl line 5. BEGIN failed--compilation aborted at ./mayor-emanuel.pl line
顺便说一句,我使用 Ubuntu 10.04。
问题:这是什么意思以及我应该做什么?
I'm very new to programming so I apologise if I've missed something obvious.
I'm following the directions at https://github.com/keeth/Net-OAuth/blob/master/README and got the following error:
Can't locate MIME/Types.pm in @INC
(@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1
/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at /usr/local/share/perl/5.10.1/Dancer/MIME.pm line 7.
It sounds like there's an error in the perl module Dancer/MIME.pm
? If so I don't know how I could ever debug that.
Addendum: more error messages.
$ ./mayor-emanuel.pl Can't locate HTTP/Body.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at
/usr/local/share/perl/5.10.1/Dancer/Request.pm line 12. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer/Request.pm line 12. Compilation failed in require at
/usr/local/share/perl/5.10.1/Dancer/Route.pm line 11. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer/Route.pm line 11. Compilation failed in require at
/usr/local/share/perl/5.10.1/Dancer/Route/Registry.pm line 5. BEGIN failed--compilation
aborted at /usr/local/share/perl/5.10.1/Dancer/Route/Registry.pm line 5. Compilation failed
in require at /usr/local/.../Dancer/App.pm line 10. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer/App.pm line 10. Compilation failed in require at
/usr/local/share/.../Dancer.pm line 13. BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/Dancer.pm line 13. Compilation failed in require at ./mayor-
emanuel.pl line 5. BEGIN failed--compilation aborted at ./mayor-emanuel.pl line
By the way I use Ubuntu 10.04.
Question: what does this mean and what should I do about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的系统上未安装 MIME::Types 模块,或者它不在您的路径中。如果是前者,则安装它(可以使用 cpan 来完成此操作)。如果它存在但不在正常位置(读取:“@INC contains:”错误中列出的目录之一),您可以通过
在
use MIME::Types;声明。
Either the MIME::Types module is not installed on your system or it's not in your path. If it's the former, then install it (you can do this with cpan). If it is present but not in a normal location (read: one of the directories listed in the "@INC contains:" error), you can add that directory by adding
ahead of the
use MIME::Types;
statement.听起来您需要安装 MIME::Types 模块。
It sounds like you need to install the MIME::Types module.
thegeekStuff 链接< /a> 完美解释了安装perl模块的过程。请浏览链接。
要安装单个 perl 模块:
下载 perl 模块,您可以在 CPAN 上找到它。
提取它,然后
make
现在
制作
通过这种方法,您将安装单个模块,但如果它有任何依赖模块,则需要手动安装它。或者,安装 perl 模块的最佳方法是
cpan
首先安装一次
cpan
,配置后,使用
cpan
安装任何模块。它还将负责安装所有依赖模块。The thegeekStuff link perfectly explains the procedures of installing a perl module. Please go through the link.
To install a individual perl module:
Download the perl module, you can find it on CPAN.
Extract it and then
make
now
make
By this method you'll install a single module, but if it has any dependent module, you'll need to install it manually. Alternatively the best way to install perl modules is
cpan
First get the
cpan
installed onceand after configuring, use
cpan
to install any module. It'll take care of installing all the dependant modules as well.