Computer How To How To, Tutorial, Example, Review


 

Force install using CPAN

November 15, 2011 by Computer

CPAN is a powerful archive of Perl modules tools. It contains many modules to do just about anything one would want to do in Perl. In order to initiate a CPAN session via the perl comand line you can use the following command:

perl -MCPAN -e shell

Which will allow you to use CPAN in shell mode. Once you configure some settings you will be taken to a prompt. To install a module you can use

cpan> install LWP::Simple

The following will install the LWP::Simple package.

On occasion you may encounter errors in compiling the module. Some could be minor, some major. If you wish to force the installation anyhow you can use the force option

cpan> force install LWP::Simple

There is also a way to force it even further

cpan> fforce install LWP::Simple

Notice the double “ff”.

For a full list of available cpan commands type “help”.

cpan> help

Display Information
 command  argument          description
 a,b,d,m  WORD or /REGEXP/  about authors, bundles, distributions, modules
 i        WORD or /REGEXP/  about anything of above
 r        NONE              reinstall recommendations
 ls       AUTHOR            about files in the author's directory

Download, Test, Make, Install...
 get                        download
 make                       make (implies get)
 test      MODULES,         make test (implies make)
 install   DISTS, BUNDLES   make install (implies test)
 clean                      make clean
 look                       open subshell in these dists' directories
 readme                     display these dists' README files

Other
 h,?           display this menu       ! perl-code   eval a perl command
 o conf [opt]  set and query options   q             quit the cpan shell
 reload cpan   load CPAN.pm again      reload index  load newer indices
 autobundle    Snapshot                force cmd     unconditionally do cmd

No comments yet.

RSS feed for comments on this post.

Leave a comment





The field of computers is very vast and can somtimes be extremely challenging, but also very rewarding. One will often times encounter problems that they may not have the answer to. Problems don't always have solutions, but sometimes they do. And helpting to provide some of those solutions is our mission. It is our goal to provide helpful computer how to, tutorial, example, and review for the benefit of everyone.

Some funny jokes...
"Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You.ll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end."

"Once upon a time there was a DOS user who saw Unix, and saw that it was good. After typing cp on his DOS machine at home, he downloaded GNU's unix tools ported to DOS and installed them. He rm'd, cp'd, and mv'd happily for many days, and upon finding elvis, he vi'd and was happy. After a long day at work (on a Unix box) he came home, started editing a file, and couldn't figure out why he couldn't suspend vi (w/ ctrl-z) to do a compile."

Terms and Disclaimer