bzip2-inst.xml 1.5 KB

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