bzip2-inst.sgml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <sect2>
  2. <title>Installation of Bzip2</title>
  3. <para>
  4. Install Bzip2 by running the following commands:
  5. </para>
  6. <blockquote><literallayout>
  7. <userinput>make -f Makefile-libbz2_so &amp;&amp;</userinput>
  8. <userinput>make bzip2recover libbz2.a &amp;&amp;</userinput>
  9. <userinput>cp bzip2-shared /bin/bzip2 &amp;&amp;</userinput>
  10. <userinput>cp bzip2recover /bin &amp;&amp;</userinput>
  11. <userinput>cp bzip2.1 /usr/share/man/man1 &amp;&amp;</userinput>
  12. <userinput>cp bzlib.h /usr/include &amp;&amp;</userinput>
  13. <userinput>cp -a libbz2.so* libbz2.a /lib &amp;&amp;</userinput>
  14. <userinput>rm /usr/lib/libbz2.a &amp;&amp;</userinput>
  15. <userinput>cd /bin &amp;&amp;</userinput>
  16. <userinput>rm bunzip2 && ln -s bzip2 bunzip2 &amp;&amp;</userinput>
  17. <userinput>rm bzcat && ln -s bzip2 bzcat &amp;&amp;</userinput>
  18. <userinput>cd /usr/share/man/man1 &amp;&amp;</userinput>
  19. <userinput>ln -s bzip2.1 bunzip2.1 &amp;&amp;</userinput>
  20. <userinput>ln -s bzip2.1 bzcat.1 &amp;&amp;</userinput>
  21. <userinput>ln -s bzip2.1 bzip2recover.1</userinput>
  22. </literallayout></blockquote>
  23. <para>
  24. Although it's not strictly a part of a basic LFS system it's worth
  25. mentioning that you can download a patch for Tar which enables the tar
  26. program to compress and uncompress using bzip2/bunzip2 easily. With a
  27. plain tar you'll have to use constructions like bzcat file.tar.bz|tar
  28. xv or tar --use-compress-prog=bunzip2 -xvf file.tar.bz2 to use bzip2 and
  29. bunzip2 with tar. This patch gives you the -y option so you can unpack a
  30. Bzip2 archive with tar xvfy file.tar.bz2. Applying this patch will be
  31. mentioned later on when you re-install the Tar package.
  32. </para>
  33. </sect2>