Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dyld: Library not loaded: /usr/local/lib/libmpfr.4.dylib

When I run "make" on a project I get this error:

dyld: Library not loaded: /usr/local/lib/libmpfr.4.dylib 
Referenced from: /Users/Petrov/Downloads/mips/bin/../libexec/gcc/mipsel-elf/4.8.1/cc1
  Reason: image not found

There is no libmpfr.4.dylib file in /usr/local/lib, but there is libmpfr.6.dylib. I have mpfr 4.0.1 installed. I have tried reinstalling Xcode and mpfr already.

like image 955
Elizabeth Haker Avatar asked Mar 23 '18 20:03

Elizabeth Haker


3 Answers

I had similar problem in Mac. I fixed it by upgrading the "gawk" using brew

brew upgrade gawk
like image 83
Utpal Kumar Avatar answered Nov 06 '22 07:11

Utpal Kumar


I solved it like this.

ln -s /usr/local/opt/mpfr/lib/libmpfr.6.dylib /usr/local/opt/mpfr/lib/libmpfr.4.dylib
like image 21
neosarchizo Avatar answered Nov 06 '22 07:11

neosarchizo


@Vinc17 is right in his comment to @neosarchizo's proposed solutiion, symlinks can be problematic if referencing a different version, HOWEVER, in my case, running the following command:

locate libmpfr.4.dylib

Showed that I did have the right library in a different directory:

/opt/local/lib/libmpfr.4.dylib

So for me, I felt it was perfectly safe to use the symlink approach, ie:

sudo ln -s /opt/local/lib/libmpfr.4.dylib /usr/local/lib/libmpfr.4.dylib

Probably a hack, but problem solved.

like image 3
Nicholas Hamilton Avatar answered Nov 06 '22 06:11

Nicholas Hamilton