I'm trying to build a Linux From Scratch system on my host Linux Mint machine. However, when I run the version-check.sh file, it returns that my system is missing libgmp.la, libmpfr.la, and libmpc.la, even though I have libgmp10, lipmpc3, and libmpfr4 . Here is the output of version check:

bash, version 4.2.45(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu)
bison (GNU Bison) 2.7.12-4996
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.6, 6-Sept-2010.
Coreutils:  8.20
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
(Ubuntu EGLIBC 2.17-93ubuntu4) 2.17
grep (GNU grep) 2.14
gzip 1.6
Linux version 3.11.0-12-generic (buildd@komainu) (gcc version 4.8.1      
(Ubuntu/Linaro 4.8.1-10ubuntu7) ) #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013
m4 (GNU M4) 1.4.16
GNU Make 3.81
GNU patch 2.7.1
Perl version='5.14.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.26
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
libgmp.la: not found
libmpfr.la: not found
libmpc.la: not found

NOTE: I'm following version 7.5 of the book and I'm using a 32-bit Linux Mint host (kernel 3.11.0-12).

  • Having those packages does not guarantee that those required files are included. Can you use apt to check what files those packages include to see if those three files are indeed present on your system?
    – HalosGhost
    Jun 7, 2014 at 18:24
  • On Debian (Mint's ultimate upstream) those are from lib32gmp-dev, lib64gmp-dev, lib32mpfr-dev, etc. Unfortunately Mint is less good about making its packages searchable via the web...
    – Bandrami
    Jun 7, 2014 at 18:24
  • Have you searched the LFS support pages? This might apply Note On some distributions, there have been reports that some libraries used by gcc can be in an inconsistent state and that this interferes with building some LFS packages. To check this, look in /usr/lib and possibly /usr/lib64 for libgmp.la, libmpfr.la, and libmpc.la. Either all three should be present or absent, but not only one or two. If the problem exists on your system, either rename or delete the .la files or install the appropriate missing package.
    – Creek
    Jun 7, 2014 at 18:45

4 Answers 4


I was also trying to build LFS system on my system. I am using Ubuntu 14.04. I got the same message during version-check. I went ahead with chapter 5 and during installing gcc, make failed with error. Checking few online help and mailing lists, I found that I had to point to the place where the libraries existed i.e. /usr/lib which I found out from this stackoverflow question.

I searched in /usr/lib and these libraries did not exist there. So, I downloaded and installed mpfr, gmp and mpc. Follow these links: gmp, mpfr and mpc.

Note: follow the build and install instructions given for gmp for mpc and mpfr. using make check for gmp results in 1 test failing which I don't think will be a problem here in LFS, hopefully. Example of gmp make check failing 1 test here.


This creates a file of installed packages:

dpkg --get-selections > package_list

cat package_list | grep ^gcc
-> OK!

cat package_list | grep gmp
-> libgmp10:amd64

cat package_list | grep mpfr
-> libmpfr4:amd64

cat package_list | grep mpc
-> libmpc3:amd64

locate libgmp10
-> /var/lib/dpkg/info/libgmp10:amd64.list

locate libmpfr4
-> /var/lib/dpkg/info/libmpfr4:amd64.list

locate libmpc3
-> /var/lib/dpkg/info/libmpc3:amd64.list

cat /var/lib/dpkg/info/libgmp10\:amd64.list
-> /usr/lib/x86_64-linux-gnu/libgmp.so.10.2.0
-> /usr/lib/x86_64-linux-gnu/libgmp.so.10

cat /var/lib/dpkg/info/libmpfr4\:amd64.list
-> /usr/lib/x86_64-linux-gnu/libmpfr.so.4.1.2
-> /usr/lib/x86_64-linux-gnu/libmpfr.so.4

cat /var/lib/dpkg/info/libmpc3\:amd64.list
-> /usr/lib/x86_64-linux-gnu/libmpc.so.3.0.0
-> /usr/lib/x86_64-linux-gnu/libmpc.so.3

The requirement for this if used with a 64-bit Architecture and Debian-Based OS will result in libgmp.la, libmpfr.la, and libmpc.la being not found. However, a result for the procedures above reveals that these packages do exist on the system, so one can move forward.


Within Creek's comment to your question lies the answer: The LFS book (I'm quoting from 7.6) has this to say regarding the three libraries you mention (libgmp.la, libmpfr.la, and libmpc.la):

"The files identified by this script should be all present or all absent, but not only one or two present."

Which is to say, given your output, you do not need to do anything additional regarding those libraries. That said, I have not completed my LFS install. My answer is only as good as the book. I ended up here myself b/c I had the same question initially.


Download, extract, compile and install the following libraries:

  • libgmp.la
  • libmpfr.la
  • libmpc.la

The general procedure to do it is:

tar -xvf lib.name
cd lib.name
./configure --prefix=/usr
sudo make
sudo make install
bash library-check.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.