I am following "Linux from Scratch" book version 8.0, and I reached section (5.7. Glibc-2.25). When trying to configure glibc
I get this error:
These critical programs are missing or too old: gawk
when I write gawk
in the terminal, I get this result :
Command 'gawk' is available in '/usr/local/bin/gawk'
The command could not be located because '/usr/local/bin' is not included in the PATH environment variable.
gawk: command not found
Earlier in the book in section 4.5 on page 31, It said:
Create the .bashrc file now:
cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH
EOF
which I did.
Update:
Running version-check.sh script from section 2.2 in the book as user lfs gives:
bash, version 4.3.46(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.27
version-check: line 10: bison: command not found
/usr/bin/yacc -> /usr/bin/bison
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.25
diff (GNU diffutils) 3.3
find (GNU findutils) 4.7.0-git
version-check: line 22: gawk: command not found
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
(Ubuntu GLIBC 2.24-3ubuntu1) 2.24
grep (GNU grep) 2.25
gzip 1.6
Linux version 4.8.0-41-generic (buildd@lgw01-18) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #44-Ubuntu SMP Fri Mar 3 15:27:17 UTC 2017
m4 (GNU M4) 1.4.17
GNU Make 4.1
GNU patch 2.7.5
Perl version='5.22.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.29
version-check: line 42: makeinfo: command not found
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
but running the same script as user root gives :
bash, version 4.3.46(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.27
bison (GNU Bison) 2.3
/usr/bin/yacc -> /usr/bin/bison
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.25
diff (GNU diffutils) 3.3
find (GNU findutils) 4.7.0-git
GNU Awk 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
g++ (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
(Ubuntu GLIBC 2.24-3ubuntu1) 2.24
grep (GNU grep) 2.25
gzip 1.6
Linux version 4.8.0-41-generic (buildd@lgw01-18) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #44-Ubuntu SMP Fri Mar 3 15:27:17 UTC 2017
m4 (GNU M4) 1.4.17
GNU Make 4.1
GNU patch 2.7.5
Perl version='5.22.2';
sed (GNU sed) 4.2.2
tar (GNU tar) 1.29
texi2any (GNU texinfo) 6.3
xz (XZ Utils) 5.1.0alpha
g++ compilation OK
It seems to me thats because /usr/local/bin
is not included in PATH environment variable,But the the book didn't say to add it.
English is not my mother language.
/usr/bin/gawk
and/usr/bin/texi2any
?