I came across the "ERROR: Can't create '/usr/bin'" error in Ubuntu when I was trying to install Module::Build. This is the only place on the internet where I could find someone having a similar problem, so I figured I'd post my fix here in case it can help you or any other searcher.
Sudoing Perl CPAN is not recommended, and it wasn't working for me anyways; I tried. After much searching I found that a better alternative to sudoing from bash is to set some configuration options inside CPAN. First, in CPAN, enter "o conf". In the list that comes up, look for make_install_make_command and mbuild_install_build_command. You'll notice that they have no mention of sudo. We're going to change that.
Enter "o conf make_install_make_command "sudo make"" and "o conf mbuild_install_build_command "sudo ./Build"". Now do o conf again, and you'll see that you changed the settings. Now do "o conf commit", and this will write all the settings to file, including your changed stuff. This way, these settings will remain if you quit and re-enter CPAN.
OK, all's set. Now you can do the "install Module::Build", and it will work. Yay!
Comment on Re: cygwin, perl5.10, INSTALLSITESCRIPT
while installing DBI perl module, am getting below error :-
ERROR: Can't create '/usr/bin' Do not have write permissions on '/usr/bin' !
Anybody having any solution for this ? i tried 2-3 ways like editing make, manually creation etc, however failed...please help me out.
Regards,
pande.mandy@gmail.com