cannot open libmpfr.so.4 after update on ubuntu 18.04

ironmaya picture ironmaya · Jul 11, 2018 · Viewed 13.1k times · Source

Today I updated my laptop to Ubuntu 18.04. Now I try to run a program for my bachelor thesis, but it gives me the following error message:

error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory

I did a bit of research, and I think libmpfr4 has been droppen in this ubuntu version. Is there any way I can solve this?

Answer

Ridge_Forrester picture Ridge_Forrester · Aug 2, 2018

I had the same problem and solved it by creating symbolic link:

sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4

Bear in mind that this is just workaround which might trigger other issues for your case. However, this might save you the day in cases when the problematic program is just a mean to achieve something else.