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!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.