Search code examples
linuxubuntucross-compilingubuntu-18.04buildroot

missing libmpfr.so.6 when using a cross-compiler


I am using Ubuntu 18.04

I built a mips cross-compiler using buildroot, but when I tried to test whether it would work,I got this message

/home/daisy/repos/repo/buildroot/output/host/bin/../libexec/gcc/mipsel-buildroot-linux-uclibc/9.3.0/cc1: error while loading shared libraries: libmpfr.so.6: cannot open shared object file: No such file or directory

I searched for solutions , one of which said this:

sudo pacman -S mpfr

Well , my Linux isn't archlinux, this didn't work for me. somebody please tells me how to deal with it.


Solution

  • In Ubuntu, apt command (Advanced Packaging Tool) is used for performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system.

    Try this command :-

    sudo apt-get update
    sudo apt install libmpfr6
    

    This will install shared libraries: libmpfr.so.6 to your Ubuntu system.

    Hope It Helps !