免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 8870 | 回复: 10
打印 上一主题 下一主题

Can't locate Device/SerialPort.pm in @INC [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-10-29 16:36 |只看该作者 |倒序浏览
20可用积分
[root@CactiEZ ~]# ./sms.pl
Can't locate Device/SerialPort.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./sms.pl line 10.
BEGIN failed--compilation aborted at ./sms.pl line 10.
[root@CactiEZ ~]#

这个应该怎么处理呢?


我想安装这个模块:
但是……

[ 本帖最后由 ppiqq 于 2008-10-29 16:37 编辑 ]

最佳答案

查看完整内容

我这里urllist 使用 http://cpan.freelamp.com/也无法下载设置cpan的urllist为ftp://www.perl87.cn/CPAN/或者或者在重新配置cpan[ 本帖最后由 ynchnluiti 于 2008-10-29 18:43 编辑 ]

论坛徽章:
3
戌狗
日期:2014-09-10 17:07:162015年辞旧岁徽章
日期:2015-03-03 16:54:15wusuopu
日期:2016-06-17 17:43:45
2 [报告]
发表于 2008-10-29 16:36 |只看该作者
我这里urllist 使用 http://cpan.freelamp.com/也无法下载

设置cpan的urllist
ftp://www.perl87.cn/CPAN/
$cpan
cpan> o conf urllist
    urllist
        http://cpan.freelamp.com/
Type 'o conf' to view configuration edit options


cpan> o conf set urllist ftp://www.perl87.cn/CPAN/
    set                urllist

cpan>


或者
cpan> o conf set urllist=ftp://cpan.mirror.ac.za/


或者在重新配置cpan
cpan> o conf init
....

(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) [] 2 ---> 一直回车到选择洲
..
Select your country (or several nearby countries) [] 1


(1) ftp://www.perl87.cn/CPAN/
(2) http://cpan.freelamp.com/
(3) ftp://cpan.mirror.ac.za/ (previous pick)
Select as many URLs as you like (by number),
put them on one line, separated by blanks, e.g. '1 4 5'
(or just hit RETURN to keep your previous picks) [3]3   ->此处选择一个

Enter another URL or RETURN to quit: [] --> 要是知道的话可以输入一个
New set of picks:
  ftp://cpan.mirror.ac.za/


commit: wrote /etc/perl/CPAN/Config.pm

cpan>

[ 本帖最后由 ynchnluiti 于 2008-10-29 18:43 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2008-10-29 16:37 |只看该作者
[root@CactiEZ ~]# perl -MCPAN -e shell
We have to reconfigure CPAN.pm due to following uninitialized parameters:

cpan_home, keep_source_where, build_dir, build_cache, scan_cache, index_expire, gzip, tar, unzip, make, pager, makepl_arg, make_arg, make_install_arg, urllist, inhibit_startup_message, ftp_proxy, http_proxy, no_proxy, prerequisites_policy, cache_metadata

/usr/lib/perl5/5.8.8/CPAN/Config.pm initialized.


CPAN is the world-wide archive of perl resources. It consists of about
100 sites that all replicate the same contents all around the globe.
Many countries have at least one CPAN site already. The resources
found on CPAN are easily accessible with the CPAN.pm module. If you
want to use CPAN.pm, you have to configure it properly.

If you do not want to enter a dialog now, you can answer 'no' to this
question and I'll try to autoconfigure. (Note: you can revisit this
dialog anytime later by typing 'o conf init' at the cpan prompt.)

Are you ready for manual configuration? [yes]


The following questions are intended to help you with the
configuration. The CPAN module needs a directory of its own to cache
important index files and maybe keep a temporary mirror of CPAN files.
This may be a site-wide directory or a personal directory.



I see you already have a  directory
    /home/anxiaobo/.cpan
Shall we use it as the general CPAN build and cache directory?

CPAN build and cache directory? [/home/anxiaobo/.cpan]


If you want, I can keep the source files after a build in the cpan
home directory. If you choose so then future builds will take the
files from there. If you don't want to keep them, answer 0 to the
next question.



How big should the disk cache be for keeping the build directories
with all the intermediate files?

Cache size for build directory (in MB)? [10]


By default, each time the CPAN module is started, cache scanning
is performed to keep the cache size in sync. To prevent from this,
disable the cache scanning with 'never'.

Perform cache scanning (atstart or never)? [atstart]


To considerably speed up the initial CPAN shell startup, it is
possible to use Storable to create a cache of metadata. If Storable
is not available, the normal index mechanism will be used.

Cache metadata (yes/no)? [yes]


The next option deals with the charset your terminal supports. In
general CPAN is English speaking territory, thus the charset does not
matter much, but some of the aliens out there who upload their
software to CPAN bear names that are outside the ASCII range. If your
terminal supports UTF-8, you say no to the next question, if it
supports ISO-8859-1 (also known as LATIN1) then you say yes, and if it
supports neither nor, your answer does not matter, you will not be
able to read the names of some authors anyway. If you answer no, names
will be output in UTF-8.

Your terminal expects ISO-8859-1 (yes/no)? [yes]


If you have one of the readline packages (Term::ReadLine:erl,
Term::ReadLine::Gnu, possibly others) installed, the interactive CPAN
shell will have history support. The next two questions deal with the
filename of the history file and with its size. If you do not want to
set this variable, please hit SPACE RETURN to the following question.

File to save your history? [/home/anxiaobo/.cpan/histfile]
Number of lines to save? [100]


The CPAN module can detect when a module that which you are trying to
build depends on prerequisites. If this happens, it can build the
prerequisites for you automatically ('follow'), ask you for
confirmation ('ask'), or just ignore them ('ignore'). Please set your
policy to one of the three values.

Policy on building prerequisites (follow, ask or ignore)? [ask]


The CPAN module will need a few external programs to work properly.
Please correct me, if I guess the wrong path for a program. Don't
panic if you do not have some of them, just press ENTER for those. To
disable the use of a download program, you can type a space followed
by ENTER.

Where is your gzip program? [/bin/gzip]
Where is your tar program? [/bin/tar]
Where is your unzip program? [/usr/bin/unzip]
Where is your make program? [/usr/bin/make]
Warning: links not found in PATH
Where is your links program? []
Where is your wget program? [/usr/bin/wget]
Warning: ncftpget not found in PATH
Where is your ncftpget program? []
Warning: ncftp not found in PATH
Where is your ncftp program? []
Where is your ftp program? [/usr/kerberos/bin/ftp]
Where is your gpg program? [/usr/bin/gpg]
What is your favorite pager program? [/usr/bin/less]
What is your favorite shell? [/bin/bash]


Every Makefile.PL is run by perl in a separate process. Likewise we
run 'make' and 'make install' in processes. If you have any
parameters (e.g. PREFIX, LIB, UNINST or the like) you want to pass
to the calls, please specify them here.

If you don't understand this question, just press ENTER.

Parameters for the 'perl Makefile.PL' command?
Typical frequently used settings:

    PREFIX=~/perl       non-root users (please see manual for more hints)

Your choice:  []
Parameters for the 'make' command?
Typical frequently used setting:

    -j3              dual processor system

Your choice:  []
Parameters for the 'make install' command?
Typical frequently used setting:

    UNINST=1         to always uninstall potentially conflicting files

Your choice:  []


Sometimes you may wish to leave the processes run by CPAN alone
without caring about them. As sometimes the Makefile.PL contains
question you're expected to answer, you can set a timer that will
kill a 'perl Makefile.PL' process after the specified time in seconds.

If you set this value to 0, these processes will wait forever. This is
the default and recommended setting.

Timeout for inactivity during Makefile.PL? [0]


If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the $CPAN::Config takes precedence.

Your ftp_proxy?  
Your http_proxy?  
Your no_proxy?  
You have no /home/anxiaobo/.cpan/sources/MIRRORED.BY
  I'm trying to fetch one
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with LWP:
  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
Fetching with Net::FTP:
  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
Fetching with Net::FTP
  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz

Trying with "/usr/bin/wget -O -" to get
    ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
--16:36:38--  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY
           => `-'
Resolving ftp.perl.org... failed: Name or service not known.

Trying with "/usr/bin/wget -O -" to get
  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
--16:36:38--  ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.gz
           => `-'
Resolving ftp.perl.org... failed: Name or service not known.
Issuing "/usr/kerberos/bin/ftp -n"
ftp: ftp.perl.org: unknown host
Not connected.
Local directory now /home/anxiaobo/.cpan/sources
Not connected.
Not connected.
Not connected.
Not connected.
Not connected.
Bad luck... Still failed!
Can't access URL ftp://ftp.perl.org/pub/CPAN/MIRRORED.BY.

Please check, if the URLs I found in your configuration file () are valid.
The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/'

Could not fetch MIRRORED.BY
CPAN.pm needs at least one URL where it can fetch CPAN files from.

Please enter your CPAN site: []
CPAN.pm needs at least one URL where it can fetch CPAN files from.

Please enter your CPAN site: []


无法继续了 小弟新手 请求帮助

论坛徽章:
3
戌狗
日期:2014-09-10 17:07:162015年辞旧岁徽章
日期:2015-03-03 16:54:15wusuopu
日期:2016-06-17 17:43:45
4 [报告]
发表于 2008-10-29 16:41 |只看该作者
dns设置对了吗

论坛徽章:
1
2015年辞旧岁徽章
日期:2015-03-03 16:54:15
5 [报告]
发表于 2008-10-29 16:43 |只看该作者
你很聪明,缺少模块确实是应该用 CPAN 安装,但是,有个前提就是你必须得能上网……尤其是能上 ftp.perl.org……

论坛徽章:
0
6 [报告]
发表于 2008-10-29 16:45 |只看该作者

论坛徽章:
0
7 [报告]
发表于 2008-10-29 17:09 |只看该作者
哦 原来是这样的啊
呵呵 我的DNS是我们公司的DNS
后来改成北京的网通好了

论坛徽章:
0
8 [报告]
发表于 2008-10-29 17:10 |只看该作者
cpan> install Device::SerialPort
CPAN: Storable loaded ok
Going to read /home/anxiaobo/.cpan/Metadata
  Database was generated on Tue, 28 Oct 2008 14:29:34 GMT
Running install for module Device::SerialPort
Running make for C/CO/COOK/Device-SerialPort-1.04.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
  http://cpan.freelamp.com/authors ... ialPort-1.04.tar.gz
LWP failed with code[403] message[Forbidden]

Trying with "/usr/bin/wget -O -" to get
    http://cpan.freelamp.com/authors ... ialPort-1.04.tar.gz
--17:09:20--  http://cpan.freelamp.com/authors ... ialPort-1.04.tar.gz
           => `-'
Resolving cpan.freelamp.com... 61.152.249.2
Connecting to cpan.freelamp.com|61.152.249.2|:80... connected.
HTTP request sent, awaiting response... 403 Forbidden
17:09:20 ERROR 403: Forbidden.


System call "/usr/bin/wget -O - "http://cpan.freelamp.com/authors/id/C/CO/COOK/Device-SerialPort-1.04.tar.gz"  > /home/anxiaobo/.cpan/sources/authors/id/C/CO/COOK/Device-SerialPort-1.04.tar"
returned status 1 (wstat 256)
Warning: expected file [/home/anxiaobo/.cpan/sources/authors/id/C/CO/COOK/Device-SerialPort-1.04.tar.gz] doesn't exist
Please check, if the URLs I found in your configuration file
(http://cpan.freelamp.com/) are valid. The urllist can be edited. E.g. with
'o conf urllist push ftp://myurl/'

Could not fetch authors/id/C/CO/COOK/Device-SerialPort-1.04.tar.gz
Giving up on '/home/anxiaobo/.cpan/sources/authors/id/C/CO/COOK/Device-SerialPort-1.04.tar.gz'
Note: Current database in memory was generated on Tue, 28 Oct 2008 14:29:34 GMT


cpan>



e^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
谢谢大大们了

论坛徽章:
0
9 [报告]
发表于 2008-10-29 17:35 |只看该作者
谢谢大大们了 我找不到Device::SerialPort
这个应该怎么办呢?

论坛徽章:
0
10 [报告]
发表于 2008-10-29 18:10 |只看该作者
你先用浏览器试试看
http://cpan.freelamp.com/authors ... ialPort-1.04.tar.gz
能下载下来不?

确认能下载下来,再用cpan
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP