What are Linux package dependencies?
When you install curl, other packages can show up in the proposed changes. Some contain libraries that curl needs. Knowing which dependencies are required and which are recommended makes the confirmation screen easier to read.
Why related packages are selected automatically
A dependency is a requirement a package has on another package or capability. On Ubuntu, for example, curl uses libraries distributed in other packages. Repository metadata describes requirements such as package names and versions. The package manager checks what is already installed and selects what else it needs. It also checks the requirements of those dependencies.
Required, recommended, and suggested packages
Debian packages use different metadata fields for different kinds of relationships. For example, the fictional entry Depends: lib-example (>= 2.0) requires version 2.0 or later of lib-example. Debian Policy on package relationships
Debian relationship fields
| Field | Meaning |
|---|---|
| Depends | Required for significant functionality or package configuration |
| Recommends | Expected for a typical installation. APT includes these by default. |
| Suggests | Related packages you can add when useful |
Inspect the dependencies of curl
These commands display dependency information without installing or upgrading packages. Results depend on your distribution, architecture, and package version. Basic package manager commands
Queries by package manager
| Tool | Query | What it shows |
|---|---|---|
| APT | apt-cache depends curl |
Dependencies of curl in the APT cache |
| RPM | rpm -q --requires curl |
Capabilities required by the installed curl package |
| pacman | pacman -Si curl |
Details for curl in the synced repository database. Look at Depends On. |
Check requirements when an upgrade is held back
If the required version is unavailable in the enabled repositories, installation or an upgrade may be held back or fail. Read the package name and version requirement in the message, then check whether the repository is intended for your OS release. Inspect your repositories and Check the fixed security version