Page 87 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 87
Operating System Tools
Notes Compiling your package is the easy part. All you need to do is run make, like so:
make
The make tool reads all of the makefiles that were created by the configure script. These files tell
make which files to compile and the order in which to compile them – which is crucial since there
could be hundreds of source files.
Depending on the speed of your system, the available memory, and how busy it is doing other
things, the compilation process could take a while to complete, so don’t be surprised.
As make is working, it will display each command it is running and all of the parameters
associated with it. This output is usually the invocation of the compiler and all of the parameters
passed to the compiler—it’s pretty tedious stuff that even the programmers were inclined to
automate!
If the compile goes through smoothly, you won’t see any error messages. Most compiler error
messages are very clear and distinct, so don’t worry about possibly missing an error. If you do
see an error, don’t panic. Most error messages don’t reflect a problem with the program itself,
but usually with the system in some way or another. Typically, these messages are the result of
inappropriate file permissions or files that cannot be found. In the latter case, make sure your
path has at the very least the /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin,
and /usr/X11R6/bin directories in it. You can see your path by issuing the following command:
echo $PATH
Notes In general, slow down and read the error message. Even if the format is a little odd,
it may explain what is wrong in plain English, thereby allowing you to quickly fix it. If the
error is still confusing, look at the documentation that came with the package to see if there
is a mailing list or e-mail address you can contact for help. Most developers are more than
happy to provide help, but you need to remember to be nice and to the point.
4.3.10 Installing the Package
Most Linux distributions use package systems, which contain programs ready for installation
and a record of what else those programs rely on.
When a package is installed, the installer checks whether the other files the program will need are
present. Each installer handles missing files differently.
There are two major types of packages for Linux systems. .rpm, used by Red Hat Linux and
distributions based on Red Hat (such as SuSE and Mandrake); and .deb, used by Debian Linux
and distributions based on Debian.
Package managers can also be used to remove or upgrade software.
.rpm and rpm: To install a .rpm on a Linux system that uses rpms, first download the file then
use the RPM package manager. The graphical versions are gnorpm for Gnome systems, and
KPackage for KDE. If you use neither, the command line version is RPM – install (package file).
On the command line, run RPM – install – test (package file) to determine which packages are
needed by the package you’re trying to install, and any other conflicts that the new software may
cause. If this shows packages that aren’t installed on your system, rpm may need to install those
as well.
You can also find out which packages are required with rpm --query --requires -p (package file).
apt, deb and dpkg
80 LOVELY PROFESSIONAL UNIVERSITY