How can I avoid sudo-ing when installing Perl modules with 'cpan'?
问题 I have installed Perl from source into /usr/local, and adjusted my path accordingly, following brian d foy's suggestion here. I'm sure I'm missing something, but, now I'm trying to install stuff with the 'cpan' command and it's failing because it can't write to /usr/local. I have to use sudo, which feels wrong to me. Should CPAN stuff go to another location? Is it normal to have to use sudo? 回答1: If it really bothers you to use sudo , you can use local::lib and install modules in your home