android O,P编译问题

编译的时候遇到问题:

Can’t locate Switch.pm in @INC (you may need to install the Switch module) (@INC contains:

环境为ubuntu20

解决方法:

1.直接安装libswitch-perl
sudo apt-get install libswitch-perl
这步操作完之后还不行,需要做第2步操作,是因为perl版本的原因

2.执行命令:sudo cpan -f Switch 根据提示一直填"yes",等待安装完成 。再次编译OK。

/usr/local/lib/perl5/5.14.2$ sudo cpan -f Switch

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] yes

Autoconfigured everything but 'urllist'.

Now you need to choose your CPAN mirror sites.  You can let me
pick mirrors for you, you can select them from a list or you
can enter them by hand.

Would you like me to automatically choose some CPAN mirror
sites for you? (This means connecting to the Internet) [yes] yes
Trying to fetch a mirror list from the Internet
Fetching with HTTP::Tiny:
http://www.perl.org/CPAN/MIRRORED.BY

Looking for CPAN mirrors near you (please be patient)
. done!

New urllist
  http://www.cpan.org/

Autoconfiguration complete.

commit: wrote '/root/.cpan/CPAN/MyConfig.pm'

You can re-run configuration any time with 'o conf init' in the CPAN shell
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/02packages.details.txt.gz
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Fri, 16 Jul 2021 18:17:03 GMT
  HTTP::Date not available
.............
  New CPAN.pm version (v2.28) available.
  [Currently running version is v1.960001]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


...............................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/03modlist.data.gz
Going to read '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Going to write /root/.cpan/Metadata
Running install for module 'Switch'
Running make for C/CH/CHORNY/Switch-2.17.tar.gz
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/C/CH/CHORNY/Switch-2.17.tar.gz
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/C/CH/CHORNY/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/C/CH/CHORNY/Switch-2.17.tar.gz ok

  CPAN.pm: Going to build C/CH/CHORNY/Switch-2.17.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Switch
Writing MYMETA.yml
cp Switch.pm blib/lib/Switch.pm
Manifying blib/man3/Switch.3
  CHORNY/Switch-2.17.tar.gz
  /usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/given.t ... ok       
t/nested.t .. ok   
t/switch.t .. ok       
All tests successful.
Files=3, Tests=590,  0 wallclock secs ( 0.02 usr  0.00 sys +  0.09 cusr  0.00 csys =  0.11 CPU)
Result: PASS
  CHORNY/Switch-2.17.tar.gz
  /usr/bin/make test -- OK
Running make install
Manifying blib/man3/Switch.3
Installing /usr/local/lib/perl5/site_perl/5.14.2/Switch.pm
Installing /usr/local/share/man/man3/Switch.3
Appending installation info to /usr/local/lib/perl5/5.14.2/x86_64-linux/perllocal.pod
  CHORNY/Switch-2.17.tar.gz
  /usr/bin/make install  -- OK

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yjsuge

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值