{"id":4457,"library":"bindep","title":"Binary Dependency Utility","description":"Bindep is a command-line utility for checking the presence of binary packages required by an application or library. It helps manage operating system-level package dependencies, particularly in development and CI environments, and originated from the OpenStack project to ensure necessary system packages are installed before Python dependencies. The current version is 2.14.0, requiring Python >=3.8, and it follows an irregular, as-needed release cadence.","status":"active","version":"2.14.0","language":"en","source_language":"en","source_url":"https://github.com/rbtcollins/bindep","tags":["cli","dependencies","packaging","system-packages","devops","openstack"],"install":[{"cmd":"pip install bindep","lang":"bash","label":"Install stable release"}],"dependencies":[],"imports":[{"note":"Bindep is primarily a command-line interface tool; direct programmatic Python imports for end-user functionality are less common.","symbol":"bindep CLI","correct":"bindep <options>"}],"quickstart":{"code":"echo \"grep\" > bindep.txt\necho \"python3-dev [platform:debian]\" >> bindep.txt\necho \"python3-devel [platform:rhel]\" >> bindep.txt\n\n# To check for missing packages:\nbindep --brief\n\n# Example of checking a specific profile (e.g., 'debian')\nbindep --profile debian --brief","lang":"bash","description":"Create a `bindep.txt` file listing binary package dependencies. Each line specifies a package name, optionally followed by profile selectors and version constraints. Then, run the `bindep` command to check for missing packages. The `--brief` option outputs only the names of missing packages."},"warnings":[{"fix":"Always use `bindep.txt` for new projects and update existing projects to use it where possible.","message":"The primary dependency file used by bindep is `bindep.txt`. However, older projects or documentation might refer to `other-requirements.txt`, which was the previous default location. Bindep will fall back to `other-requirements.txt` if `bindep.txt` is not found.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `bindep.txt` files are correctly formatted, adhere to Debian package naming conventions, and use lowercase characters without underscores for profile names. Validate the file rigorously.","message":"Malformed `bindep.txt` files, such as those missing a trailing newline or containing invalid characters in profile names (e.g., uppercase or underscores), can lead to `ParseError` or difficult-to-debug build failures.","severity":"breaking","affected_versions":"All versions"},{"fix":"Leverage `platform:` selectors (e.g., `[platform:debian]`, `[platform:rhel]`) in `bindep.txt` to define platform-specific package names, ensuring cross-platform compatibility. The supported platform profiles are not extensively documented, requiring some experimentation or inspection of bindep's source.","message":"Binary package names vary significantly across different operating systems and distributions (e.g., `libxml2-dev` on Debian-based systems vs. `libxml2-devel` on RPM-based systems). Without proper platform profiles, `bindep` might incorrectly report missing packages or fail to identify the correct ones.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For more detailed diagnostic information, rely on `bindep`'s verbose output rather than solely the exit code when troubleshooting. Consider piping output to a file and parsing it for specific error messages.","message":"The `bindep` CLI exit code `1` is overloaded, indicating either 'file not found/reading errors' or 'missing/incompatible packages'. This ambiguity can make automated parsing and error handling challenging.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}