Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidently deleted the default Perl library on Mac OSX Mountain Lion. I know it was a stupid mistake, but how do I fix it? Whenever I try to use Perl I get

dyld: Library not loaded: /System/Library/Perl/5.12/darwin-thread-multi-2level/CORE/libperl.dylib 
Referenced from: /usr/bin/perl5.12
Reason: image not found
Trace/BPT trap: 5

What do I do so I can use Perl again?

share|improve this question

migrated from Jan 2 '13 at 16:39

This question came from our site for professional and enthusiast programmers.

Just restore from your backup (e.g. Time Machine). – Paul R Jan 2 '13 at 10:34
do you get any output when you do a perl -v ? – Tudor Constantin Jan 2 '13 at 10:35
I can't restore from a backup because I dont know when it happened. When I do perl -v I get that output. @TudorConstantin – Ulmer Jan 2 '13 at 10:39
Nuclear option: backup your data, reinstall osx, start using perlbrew and try not to touch system perl ever again – nickisfat Jan 2 '13 at 12:24

Open a terminal,

curl -L | bash

Then quit terminal. You should be all set. Installation does take a few minutes.

share|improve this answer

You must log in to answer this question.