When running an example of apt depends
command, e.g.
$ apt depends nginx
nginx
|Depends: nginx-core (<< 1.14.0-0ubuntu1.2.1~)
|Depends: nginx-full (<< 1.14.0-0ubuntu1.2.1~)
|Depends: nginx-light (<< 1.14.0-0ubuntu1.2.1~)
Depends: nginx-extras (<< 1.14.0-0ubuntu1.2.1~)
|Depends: nginx-core (>= 1.14.0-0ubuntu1.2)
|Depends: nginx-full (>= 1.14.0-0ubuntu1.2)
|Depends: nginx-light (>= 1.14.0-0ubuntu1.2)
Depends: nginx-extras (>= 1.14.0-0ubuntu1.2)
what is the meaning of the |
symbol in the beginning of some of the listed dependencies?
Best Answer
The pipe introduces alternate dependencies:
nginx
depends on one ofnginx-core
,nginx-full
,nginx-light
, ornginx-extras
. The doubles dependencies are used to specify a version range. (The completely dependency constraints aren’t visible here, which suggests that they are insufficient — butnginx-core
,-full
,-light
, and-extras
conflict with each other, which ensures that the “or” in the set of dependencies is an “exclusive or”.)You’ll see this more clearly if you look at the output of
apt show nginx
.