Go Back   The macosxhints Forums > Working with OS X > OS X Developer



Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 02-14-2012, 04:40 AM   #1
dr chris jones
Triple-A Player
 
Join Date: Mar 2004
Location: London, UK
Posts: 147
Lion, sudo and cpan

I've recently upgraded to Lion, and found that sudo doesn't work like it used to. Specifically, I now can't launch /usr/bin/cpan to install Perl modules. In Leopard/Snow Leopard, I used to do this under sudo in order that cpan would have the admin privileges required to perform make install. But now I get "sudo: cpan: command not found". Also, where I used to be able to launch cpan without sudo, I now can't do that either (getting a "Permission denied" error).

I've never tinkered with the sudoers file, or modified which apps can run under sudo - is this what I need to do to fix this? If so, can someone give me the heads up how to safely do that?

Before anyone suggests it - I don't want a second Perl installation, don't want to use Fink, homebrew, etc - I just want cpan to work again!
dr chris jones is offline   Reply With Quote
Old 02-14-2012, 04:43 AM   #2
dr chris jones
Triple-A Player
 
Join Date: Mar 2004
Location: London, UK
Posts: 147
Forgot to mention that my account is the admin account on the computer and I can use sudo to perform other tasks (like chown, chmod etc). So far, cpan is the only task I've found I can't use under sudo
dr chris jones is offline   Reply With Quote
Old 02-14-2012, 04:46 AM   #3
dr chris jones
Triple-A Player
 
Join Date: Mar 2004
Location: London, UK
Posts: 147
Oh, errr.... and perldoc
dr chris jones is offline   Reply With Quote
Old 02-14-2012, 05:04 AM   #4
dr chris jones
Triple-A Player
 
Join Date: Mar 2004
Location: London, UK
Posts: 147
OK, I feel a bit silly for not spotting the bleeding obvious..... My mention of chown and chmod working reminded me that I hadn't checked the permissions in /usr/bin, and of course there were lots of errors. A quick "Repair Permissions" in Disk Utility has fixed the problem.

So now my question is - How does this happen? (Permissions getting broken, not me being half asleep)
dr chris jones is offline   Reply With Quote
Old 02-14-2012, 07:19 AM   #5
jsalmi
Major Leaguer
 
Join Date: May 2008
Location: Down by the river
Posts: 275
I'm curious as to which files/directories had permission issues after moving to Lion?
jsalmi is online now   Reply With Quote
Old 02-14-2012, 10:03 AM   #6
dmacks
All Star
 
Join Date: Dec 2004
Posts: 678
I've seen an occasional user where lots of /usr/bin/ perlscripts lose their +x but I haven't seen anyone diagnose a common trigger of it.
dmacks is offline   Reply With Quote
Old 02-14-2012, 01:42 PM   #7
dr chris jones
Triple-A Player
 
Join Date: Mar 2004
Location: London, UK
Posts: 147
Quote:
Originally Posted by jsalmi
I'm curious as to which files/directories had permission issues after moving to Lion?

I didn't migrate (I'm not sure that's even possible...!) - it was a clean Lion install on a new iMac. Having looked back, I remember I had used cpan successfully when I first got my iMac, so these permission changes have obviously happened recently - and they seem to be Perl related (cpan, perldoc amongst a few errors).

The only related app I've installed recently is Eclipse and its Perl IDE, Epic - but why would that screw up the cpan and perldoc permissions?
dr chris jones is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 08:10 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.