Over a million developers have joined DZone.

Cpan With Sudo


If CPAN is installed in your home directory, the system-wide cpan may cause problems when run via sudo(8), as by default sudo will invoke CPAN using the ~/.cpan/CPAN/MyConfig.pm configuration, but as root, which causes no end of trouble. To avoid this problem, reset the HOME environment variable with the -H option to sudo when invoking CPAN.

sudo -H cpan

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}