简体   繁体   中英

PDF::Create module installation failed using cpan linux command?

When I tried to install cpan module, i get the following error, i have tried by googling it,am unable to find solution.

Catching error: "Can't locate object method \"Create\" via package   \"install PDF\" (perhaps you forgot to load \"install PDF\"?) at /usr/share /perl5/CPAN.pm line 376, <STDIN> line 1.\cJ" at /usr/share/perl5/CPAN.pm line 392, <STDIN> line 1.
CPAN::shell() called at /usr/share/perl5/App/Cpan.pm line 295
App::Cpan::_process_options('App::Cpan') called at /usr/share/perl5/App/Cpan.pm line 364
App::Cpan::run('App::Cpan') called at /usr/bin/cpan line 11

Your error can be reproduced by doing the following:

$ cpan
...
cpan shell -- CPAN exploration and modules installation (v2.10)
Enter 'h' for help.

cpan[1]> "install PDF::Create"
Catching error: "Can't locate object method \"Create\" via package   \"install PDF\" (perhaps you forgot to load \"install PDF\"?) ...

The problem is you putting quotes around the whole command, apparently.

Solution: Remove the quotes:

cpan[2]> install PDF::Create

... works fine here.

Also, you can just do cpan PDF::Create without entering the cpan shell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM