Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1
apt-get remove  —purgeapt   purge

apt-get autoremove apt  autoremove

apt-get search apt  search

apt-get show apt    show

dpkg    —get-selections apt list    —installed

apt-get purge apt   purge

Compiling Software from Source


Compiling applications from source is not difficult. There are two ways to do
it: You can use the source code available in the Ubuntu repositories, or you
can use the source code provided by upstream developers (which is most
useful for projects that are not available in the Ubuntu repositories). For either
method, you need to install the build-essential package to ensure that
you have the tools you need for compilation. You may also need to install
automake and checkinstall, which are build tools.


Compiling from a Tarball


Most source code that is not in the Ubuntu repositories is available from the
original writer or from a company’s website as compressed source tarballs
—that is, tar files that have been compressed using gzip or bzip. The
compressed files typically uncompress into a directory containing several
files. It is always a good idea to compile source code as a regular user to limit
any damage that broken or malicious code might inflict, so create a directory
named source in your home directory.


From wherever you downloaded the source tarball, uncompress it into the
~/source directory by using the -C option to tar:


Click here to view code image
matthew@seymour:~$ tar zxvf packagename.tgz -C ~/source
matthew@seymour:~$ tar zxvf packagename.tar.gz -C ~/source
matthew@seymour:~$ tar jxvf packagename.bz -C ~/source
matthew@seymour:~$ tar jxvf packagename.tar.bz2 -C ~/source


If you are not certain what file compression method was used, use the file

Free download pdf