Messed up my perl install on Mac OS X 10.6

8,085

Solution 1

This may seem like I'm a total Mac Newb (though I've used a Mac since the LC) but since installing the combined update for 10.6.2 didn't fix this issue even though it overwrote the files, I realized belatedly that Disk Utility's "Repair Permissions" button would fix it. And it did.

The odd thing is the actual binary /usr/bin/perldoc wasn't touched. It's probably got something to do with one of those bundles in the output.

Here's what it output as it fixed stuff (note the last line is a ? for me)

Repairing permissions for “Macintosh HD”
Permissions differ on "private/etc/postfix/main.cf.default", should be -rw-r--r-- , they are -r--r--r-- .
Repaired "private/etc/postfix/main.cf.default".
Permissions differ on "usr/bin/c2ph", should be -rwxr-xr-x , they are -rw-rw-rw- .
Repaired "usr/bin/c2ph".
Permissions differ on "usr/bin/config_data", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/config_data".
Permissions differ on "usr/bin/cpan", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/cpan".
Permissions differ on "usr/bin/enc2xs", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/enc2xs".
Permissions differ on "usr/bin/instmodsh", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/instmodsh".
Permissions differ on "usr/bin/piconv", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/piconv".
Permissions differ on "usr/bin/prove", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/prove".
Permissions differ on "usr/bin/shasum", should be -rwxr-xr-x , they are -r-xr-xr-x .
Repaired "usr/bin/shasum".
Permissions differ on "usr/share/derby", should be drwxr-xr-x , they are lrwxr-xr-x .
Repaired "usr/share/derby".
Permissions differ on "Library/Perl/5.10.0/darwin-thread-multi-2level/NetSNMP/default_store.pm", should be -rw-rw-r-- , they are -r--r--r-- .
Repaired "Library/Perl/5.10.0/darwin-thread-multi-2level/NetSNMP/default_store.pm".
Permissions differ on "Library/Perl/5.10.0/darwin-thread-multi-2level/auto/NetSNMP/default_store/autosplit.ix", should be -rw-rw-r-- , they are -r--r--r-- .
Repaired "Library/Perl/5.10.0/darwin-thread-multi-2level/auto/NetSNMP/default_store/autosplit.ix".
Permissions differ on "Library/Perl/5.10.0/darwin-thread-multi-2level/auto/NetSNMP/default_store/default_store.bundle", should be -rwxrwxr-x , they are -r-xr-xr-x .
Repaired "Library/Perl/5.10.0/darwin-thread-multi-2level/auto/NetSNMP/default_store/default_store.bundle".
Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent" has been modified and will not be repaired.

Permissions repair complete

Solution 2

Try using Pacifist to run the appropriate Installer package from your 10.6 disc. I am not sure which package it is off the top of my head, but Pacifist lets you browse and search the packages on disc. I don't believe it will remove new files, but it'll restore your Perl installation to the working default. You can also selectively extract files and folders.

Using Pacifist to search for "Perl" on the Mac OS X 10.6 disc.

I used it a couple of years ago to do damage control (quite successfully, I might add) following a rather embarrassing incident involving sudo rm -fr /bin. Don't ask.

Solution 3

Yep...Disk Utilities "Repair Permissions" worked for me as well. Same problem...installed the DBD::mysql module and it hosed up the permissions.

Solution 4

You can always download the latest perl from http://www.cpan.org/src/5.0/latest.tar.bz2.

You'll need to unarchive, and run Configure.

I personally usually prefer having my own installation of perl, even when the basic OS included a version. That means that my scripts can be upgraded to later versions on my schedule, not the maintainers.

Solution 5

maybe it helps to install the latest update under http://support.apple.com/kb/DL959. i had massive problems after an full system restore with time machine. it seems that this corrupts many things and i couldn't use quicklook anymore besides other stuff. after reinstalling this update all functions as normal. with a little bit of luck perl is in this update.

Share:
8,085

Related videos on Youtube

dlamblin
Author by

dlamblin

I had something here once. It was about work. #SOreadytohelp

Updated on September 17, 2022

Comments

  • dlamblin
    dlamblin over 1 year

    I have messed up my perl install on Mac OS X 10.6. I'll explain how:
    I wanted to add a cpan package for Bundle::DBD::mysql, cpan told me to update Bundle::CPAN first. I couldn't because of permissions. So I sudoed perl -MCPAN -e shell and updated cpan, then I got the mysql bundle, but it failed some tests, which I then forced the install (it works btw). Then for some reason I decided to rebuild the mysql bundle. This took a long long time. Eventually I realized it had rebuilt a lot, like perldoc.

    Now whenever I try and run perldoc I haven't the permission to do so, but when I sudo perldoc to tells me it can't find it.

    dlamblins-macbook:~ dlamblin$ perldoc
    -bash: /usr/bin/perldoc: Permission denied
    dlamblins-macbook:~ dlamblin$ sudo perldoc
    Password:
    sudo: perldoc: command not found
    dlamblins-macbook:~ dlamblin$ sudo /usr/bin/perldoc
    Password:
    sudo: /usr/bin/perldoc: command not found
    

    I'd like to reinstall perl for real the way Apple installed it when I updated to Snow Leopard (though keeping DBD::mysql would be nice), and I don't know where to start. I do not want to go with some fink package or ports styled system. Getting the latest perl 5.10 would be a plus.

  • Lawrence Velázquez
    Lawrence Velázquez over 14 years
    It's not a particularly good idea to overwrite the default Perl installation with a custom one, since software updates and the like may make assumptions regarding the default system Perl. If you're going to roll your own Perl, it's best to install it to /usr/local or another out-of-the-way location. In any case, he's still going to have to fix his system Perl.
  • gorilla
    gorilla over 14 years
    I wouldn't overwrite the default installation, I meant install a new installation in a separate directory.
  • Lawrence Velázquez
    Lawrence Velázquez over 14 years
    Gotcha, but that still doesn't fix his broken default Perl.
  • dlamblin
    dlamblin over 14 years
    I tried this and it did not work. It did however fix the mysterious hard-hanging flash plugin which had been the bane of youtube (and other flash video) since updating to the improved "safari plugin stability". Re-installing resolved this, but not my perldoc permission issue.
  • dlamblin
    dlamblin over 14 years
    Actually this flash plug in stability thing comes and goes; it goes with a restart and I don't know what causes it yet.
  • dlamblin
    dlamblin about 14 years
    For the interested: the flash stability had to do with audio in flash video and an incompatibility in Audio Hijack Pro. See: superuser.com/questions/83315