App::cpanminus(3)
β¨ App::cpanminus β¨ β the manual, but make it make sense π
okay so bestie, you found the cpanminus manpage. and honestly? iconic. this is the tool that gets, unpacks, builds, and installs modules from CPAN and literally does nothing else. not a single extra thing. it's giving "i have one job and i do it flawlessly." no cap. π
π¦ SYNOPSIS π¦
cpanm Module
run cpanm -h or perldoc cpanm for more options. that's it. that's the whole vibe. β¨
πΈ DESCRIPTION πΈ
cpanminus is a script to get, unpack, build, and install modules from CPAN, and it does nothing else. it's dependency free (can bootstrap itself), requires zero configuration, and stands alone. when running, it requires only 10MB of RAM. yes, you read that right β ten megabytes. it's lowkey the most efficient thing you'll ever use. π«Ά
π INSTALLATION π
there are several ways to install cpanminus to your system. pick your fighter. π
Package management system π«Ά
there are Debian packages, RPMs, FreeBSD ports, and packages for other operating systems available. if you want to use the package management system, search for cpanminus and use the appropriate command to install. this makes it easy to install cpanm to your system without thinking about where to install, and later upgrade. slay. β¨
Installing to system perl π
you can also use the latest cpanminus to install cpanminus itself:
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
this will install cpanm to your bin directory like /usr/local/bin and you'll need the --sudo option to write to the directory, unless you configured INSTALL_BASE with local::lib. no cap, that --sudo is important. π«‘
Installing to local perl (perlbrew, plenv etc.) π
if you have perl in your home directory, which is the case if you use tools like perlbrew or plenv, you don't need the --sudo option, since you're most likely to have write permission to the perl's library path. you can just do:
curl -L https://cpanmin.us | perl - App::cpanminus
to install the cpanm executable to the perl's bin path, like ~/perl5/perlbrew/bin/cpanm. easy. π
Downloading the standalone executable π¦
you can also copy the standalone executable to whatever location you'd like.
cd ~/bin
curl -L https://cpanmin.us/ -o cpanm
chmod +x cpanm
this just works, but be sure to grab the new version manually when you upgrade because --self-upgrade might not work with this installation setup. just a heads up, bestie. β οΈ
Troubleshoot: HTTPS warnings π
when you run curl commands above, you may encounter SSL handshake errors or certification warnings. this is due to your HTTP client (curl) being old, or SSL certificates installed on your system needing to be updated.
you're recommended to update the software or system if you can. if that is impossible or difficult, use the -k option with curl. it's not ideal but it works. π
π₯ DEPENDENCIES π₯
- perl 5.8.1 or later.
'tar'executable (bsdtar or GNU tar version 1.22 are recommended) orArchive::Tarto unpack files.- C compiler, if you want to build XS modules.
makeModule::Build(core in 5.10)
that's the whole list. no hidden surprises. β¨
π QUESTIONS π
How does cpanm get/parse/update the CPAN index? π€
it queries the CPAN Meta DB site at <http://cpanmetadb.plackperl.org/>. the site is updated at least every hour to reflect the latest changes from fast syncing mirrors. the script then also falls back to query the module at <http://metacpan.org/> using its search API.
upon calling these API hosts, cpanm (1.6004 or later) will send the local perl versions to the server in User-Agent string by default. you can turn it off with --no-report-perl-version option. read more about the option with cpanm, and read more about the privacy policy about this data collection at <http://cpanmetadb.plackperl.org/#privacy>. just so you know. π
fetched files are unpacked in ~/.cpanm and automatically cleaned up periodically. you can configure the location of this with the PERL_CPANM_HOME environment variable. nice. π
Where does this install modules to? Do I need root access? π
it installs to wherever ExtUtils::MakeMaker and Module::Build are configured to (via PERL_MM_OPT and PERL_MB_OPT).
by default, it installs to the site_perl directory that belongs to your perl. you can see the locations for that by running perl -V and it will be likely something under /opt/local/perl/... if you're using system perl, or under your home directory if you have built perl yourself using perlbrew or plenv.
if you've already configured local::lib on your shell, cpanm respects that settings and modules will be installed to your local perl5 directory.
at boot time, cpanminus checks whether you have already configured local::lib, or have permission to install modules to the site_perl directory. if neither, i.e. you're using system perl and do not run cpanm as root, it automatically sets up local::lib compatible installation path in a perl5 directory under your home directory.
to avoid this, run cpanm either as a root user, with --sudo option, or with --local-lib option. choose your adventure. π’
cpanminus can't install the module XYZ. Is it a bug? π€
it is more likely a problem with the distribution itself. cpanminus doesn't support or may have issues with distributions such as follows:
- Tests that require input from STDIN.
- Build.PL or Makefile.PL that prompts for input even when
PERL_MM_USE_DEFAULTis enabled. - Modules that have invalid numeric values as VERSION (such as
1.1a)
these failures can be reported back to the author of the module so that they can fix it accordingly, rather than to cpanminus. don't shoot the messenger, bestie. π
Does cpanm support the feature XYZ of CPAN and CPANPLUS? π€·
most likely not. here are the things that cpanm doesn't do by itself.
if you need these features, use CPAN, CPANPLUS or the standalone tools that are mentioned.
- CPAN testers reporting. See
App::cpanminus::reporter - Building RPM packages from CPAN modules
- Listing the outdated modules that needs upgrading. See
App::cpanoutdated - Showing the changes of the modules you're about to upgrade. See
cpan-listchanges - Patching CPAN modules with distroprefs.
see cpanm or cpanm -h to see what cpanminus can do :) it's not everything, but it's honest work. π«Ά
π COPYRIGHT π
Copyright 2010- Tatsuhiko Miyagawa
the standalone executable contains the following modules embedded.
CPAN::DistnameInfoCopyright 2003 Graham Barrlocal::libCopyright 2007-2009 Matt S TroutHTTP::TinyCopyright 2011 Christian HansenModule::MetadataCopyright 2001-2006 Ken Williams. 2010 Matt S TroutversionCopyright 2004-2010 John PeacockJSON::PPCopyright 2007-2011 by Makamaka HannyaharamituCPAN::Meta,CPAN::Meta::RequirementsCopyright (c) 2010 by David Golden and Ricardo SignesCPAN::Meta::YAMLCopyright 2010 Adam KennedyCPAN::Meta::CheckCopyright (c) 2012 by Leon TimmermansFile::pushdCopyright 2012 David GoldenparentCopyright (c) 2007-10 Max MaischeinParse::PMFileCopyright 1995 - 2013 by Andreas Koenig, Copyright 2013 by Kenichi IshigakiString::ShellQuoteby Roderick Schertler
π LICENSE π
this software is licensed under the same terms as Perl. π
π CREDITS π
CONTRIBUTORS π«Ά
patches and code improvements were contributed by:
Goro Fuji, Kazuhiro Osawa, Tokuhiro Matsuno, Kenichi Ishigaki, Ian Wells, Pedro Melo, Masayoshi Sekimura, Matt S Trout (mst), squeeky, horus and Ingy dot Net.
ACKNOWLEDGEMENTS π
bug reports, suggestions and feedbacks were sent by, or general acknowledgement goes to:
Jesse Vincent, David Golden, Andreas Koenig, Jos Boumans, Chris Williams, Adam Kennedy, Audrey Tang, J. Shirley, Chris Prather, Jesse Luehrs, Marcus Ramberg, Shawn S Moore, chocolateboy, Chirs Nehren, Jonathan Rockway, Leon Brocard, Simon Elliott, Ricardo Signes, AEvar Arnfjord Bjarmason, Eric Wilhelm, Florian Ragwitz and xaicron.
π¬ COMMUNITY π¬
- <http://github.com/miyagawa/cpanminus> - source code repository, issue tracker
- <irc://irc.perl.org/#cpanm> - discussions about cpanm and its related tools
come hang out. π¦
π« NO WARRANTY π«
this software is provided "as-is," without any express or implied warranty. in no event shall the author be held liable for any damages arising from the use of the software. just so we're clear. π
π SEE ALSO π
CPAN CPANPLUS pip
that's the whole squad. π
π that's the whole vibe. this page was brought to you by perl v5.42.0, dated 2026-03-17, and the manual name App::cpanminus(3). now go install some modules, bestie. π
β¨
π¦ where this page comes from
- arch rolling: cpanminus 1.7049-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms