Dependency
Problem
A dependency is when one program depends on another program to perform its normal operation. Example: a program such as KDE could rely on GLIBC-2.3.3 to function normally, because it uses some functions from the GLIBC library. On Unix, as a contrast to other operating systems, it is quite normal that installing software or even running software A requires software B to be installed.
Example
In the following example, the user tries to compile vlc without having ffmpeg installed. The configure script fails:
scorpio:~/vlc-0.8.5 # ./configure && make && make install [...] checking ffmpeg/avcodec.h presence... no checking for ffmpeg/avcodec.h... no configure: error: Missing header file ffmpeg/avcodec.h.
In the above example, you should install the missing package as described in installing software. If your distribution also provides development packages, install them as well.
Solution
Logically, dependencies can pose a problem. What if you downloaded KDE, which requires GLIBC, which requires GCC, which requires... etc? This has been solved by automatic dependency resolution. Most modern distributions allow the use of a dependency resolution system to eliminate this particular problem. Some of the more popular:
- Mandrake: urpmi/RPMDrake
- Fedora: yum/up2date
- Red Hat: yum/up2date
- SUSE: yast2
- Gentoo: portage
- Debian: apt-get
- Slackware: swaret/slapt-get (these are not official and use of them is often not reccomended)
However, automatic dependency resolution is not 100% of a solution. If you compile software and get an error message that you are missing avcodec.h, you still do not know which package it is in. If you build software and get a message that PCRE is missing, you still do not know the package name as it is in your distribution. Here are some files that can be missing and their packages names:
file or package name | Debian package name | Suse package name |
---|---|---|
cpufreq.h | libcpufreq-dev | |
development packAge of bzlib | libbz2-dev | |
/usr/include/alsa/asoundlib.h | alsa-devel | |
GIF development package | libgif-dev | |
gl.h | libglitz1-dev | |
GL/glu.h | libglut3-dev | |
PCRE | libpcre++-dev | |
XSLT development package | libxslt-dev |