iosxcodeperldyldperlbrew

dyld: Library not loaded: libperl.dylib Referenced from: perl5.18


Im getting dyld library not found error in my xcode.

dyld: Library not loaded: /System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/libperl.dylib Referenced from: /usr/bin/perl5.18

So I tried to reinstall perl as following.But i got the following error message in my terminal when it is getting downloaded

Setting Perl 5.16.0 to default bash: line 94: perlbrew: command not found

So i tried to install perlbrew as follows,

\curl -L https://install.perlbrew.pl | bash

But it is providing the same dyld error message as follows,

dyld: Library not loaded: /System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/libperl.dylib Referenced from: /usr/bin/perl5.18

How can i be able to sort this out?


Solution

  • Looking at the the error message

    Setting Perl 5.16.0 to default bash: line 94: perlbrew: command not found
    

    I can see that you used below to install Perl

    curl -L https://raw.githubusercontent.com/ranguard/installing-perl/master/scripts/install_perl_on_osx.sh | bash
    

    The above script uses perlbrew therefore you are seeing the same error while installing perlbrew using \curl -L https://install.perlbrew.pl | bash.

    I think you have corrupted your system Perl. You should take backup of your system and reinstall OSX. After that install perlbrew and never touch your system perl again.