Is there a way to restore default perl5 and cpan modules in Mojave without rebuilding the OS?

  • 1
    What happened to them? – JBis May 5 at 2:33
  • Thanks for asking. I was concerned about trashing the OS default perl and cpan after a round of trying to use MacPorts's perl5. I could not get a Github perl project to build (make) with Macports, so I switched to the default perl and the make succeeded. I was then afraid that the process might have mucked up default modules. Can you tell I am a perl noob? Anyway, after much perl -V and file diffs between a clean system and mine, I convinced myself it was fine. – whitey May 6 at 16:22

Standard binaries are protected by SIP and can‘t easily be removed nor replaced. Booting into recovery and reinstalling macOS only is the easiest way to solve this. You may need to manually reinstall any user-installed CPAN modules again afterwards.

  • Thanks nohillside. I spaced out on SIP protections. I was concerned after reading many warnings about NOT using Apple's default perl for development. Anyway see my comment to @JBis also. – whitey May 6 at 16:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .