Search code examples
perlinstallationcpan

How do I change where cpan caches files?


I'm trying to install a bunch of Perl modules. I'm getting a lot of errors that look like this:

Cannot write to ‘/home/mayo/foo/.cpan/sources/authors/id/C/CH/CHROMATIC/SUPER-1.20190531.tar.gz.tmp10717’ (Disk quota exceeded).

How do I change the location of the .cpan directory?


Solution

  • cpan likes to work out of $HOME/.cpan, and you probably don't want to try too hard to convince it to use something else.

    The best advice is to make a symbolic link to $HOME/.cpan from a more bountiful file system.