mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-19 13:37:39 +00:00
3acb38f277
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1092 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
33 lines
1.5 KiB
XML
33 lines
1.5 KiB
XML
<sect2>
|
|
<title>Installation of File</title>
|
|
|
|
<para>Note that the sed used in this installation only works if the line
|
|
break is placed exactly where it is in the book. Don't try and put it
|
|
all on one line otherwise it won't work. Install File by running the
|
|
following commands:</para>
|
|
|
|
<para><screen><userinput>cp readelf.h readelf.h.backup &&</userinput>
|
|
<userinput>sed '/#define __/a \</userinput>
|
|
<userinput> #include <stdint.h>' readelf.h.backup > readelf.h &&</userinput>
|
|
<userinput>./configure --prefix=/usr --datadir=/usr/share/misc &&</userinput>
|
|
<userinput>make &&</userinput>
|
|
<userinput>make install</userinput></screen></para>
|
|
|
|
<para>File uses magic numbers to determine a file type. These magic numbers
|
|
come with File in a plain text file. File internally compiles this database
|
|
each time it is run. This is not the normal type of operation for File since
|
|
compiling a
|
|
plain text file each time is not the fastest way to do it. File offers an
|
|
option "-C" to compile this magic number file. The reason this isn't done
|
|
automatically is that some people like to work on the magic numbers. On the
|
|
other hand many people didn't get it that they should compile the magic
|
|
numbers, so the author of File added a warning when the plain text magic file
|
|
is used. As we usually won't work on the plain text magic file, we
|
|
compile this file, because it's faster, fixes that annoying warning and is how
|
|
it was meant to be:</para>
|
|
|
|
<para><screen><userinput>file -C</userinput></screen></para>
|
|
|
|
</sect2>
|
|
|