{"record":{"id":"b16b2709d5bd4950","repo":"influxdata/influxdb","slug":"package-manager-not-available-0","errorCode":null,"errorMessage":"Package manager not available: {0}","messagePattern":"Package manager not available: (.+?)","errorType":"exception","errorClass":"PluginEnvironmentError","httpStatus":null,"severity":"error","filePath":"influxdb3_processing_engine/src/environment.rs","lineNumber":15,"sourceCode":"use crate::environment::PluginEnvironmentError::PluginEnvironmentDisabled;\n\nuse crate::virtualenv::{VenvError, find_python, initialize_venv};\nuse observability_deps::tracing::debug;\nuse pyo3::prelude::PyAnyMethods;\nuse pyo3::{PyResult, Python};\nuse std::fmt::Debug;\nuse std::path::{Path, PathBuf};\nuse std::process::Command;\nuse std::sync::{Arc, OnceLock};\nuse thiserror::Error;\n\n#[derive(Error, Debug)]\npub enum PluginEnvironmentError {\n    #[error(\"Package manager not available: {0}\")]\n    PackageManagerNotFound(String),\n    #[error(\"External call failed: {0}\")]\n    InstallationFailed(#[from] std::io::Error),\n    #[error(\"Plugin environment management is disabled\")]\n    PluginEnvironmentDisabled,\n\n    #[error(\"Virtual environment error: {0}\")]\n    VenvError(#[from] VenvError),\n\n    #[error(\"Failed to list packages: {0}\")]\n    PackageListFailed(String),\n\n    #[error(\n        \"Package installation has been disabled. Contact your administrator for more information.\"\n    )]\n    PackageInstallationDisabled,\n}\n","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_processing_engine/src/environment.rs#L1-L33","documentation":"PluginEnvironmentError::PackageManagerNotFound is thrown by influxdb3's processing engine plugin environment manager when the system package manager (e.g. apt, dnf, brew) needed to provision a plugin's Python environment cannot be found. It carries the name/details of the manager that was probed.","triggerScenarios":"Triggering plugin environment setup (installing plugin dependencies) on a system where the expected package manager binary is absent from PATH, or on an unsupported OS/distribution.","commonSituations":"Running influxdb3 in a minimal/slim container (no apt/yum installed); running as non-root in a distroless image; deploying on Alpine where apt/dnf are absent; PATH stripped in the systemd unit.","solutions":["Install the system package manager expected by the host platform (e.g. apt-get in Debian/Ubuntu images)","Ensure the package manager binary is on the PATH of the influxdb3 process (check systemd Environment=)","Use a base image that includes a package manager, or pre-install plugin dependencies in the image","Pre-provision the plugin's virtual environment manually so no package manager call is needed"],"exampleFix":"# before (Dockerfile)\nFROM gcr.io/distroless/cc\n# after\nFROM debian:bookworm-slim\nRUN apt-get update && apt-get install -y python3 python3-venv","handlingStrategy":"validation","validationCode":"// shell: verify a package manager before enabling env management\nfor pm in apt-get dnf yum brew apk; do\n  command -v \"$pm\" >/dev/null 2>&1 && echo \"found: $pm\" && exit 0\ndone\necho \"no package manager found\" >&2; exit 1","typeGuard":null,"tryCatchPattern":"match env_manager.setup(plugin).await {\n    Err(PluginEnvironmentError::PackageManagerNotFound(pm)) => {\n        eprintln!(\"install {pm} or pre-provision the environment\");\n        Err(anyhow!(\"package manager {pm} missing\"))\n    }\n    other => other,\n}","preventionTips":["Use base images that include a package manager (not distroless) when env management is on","Keep the manager binary on the influxdb3 process PATH","Pre-provision plugin environments to avoid needing a package manager at all","Document supported distros for plugin environment management"],"tags":["rust","plugin-environment","package-manager","system-dependency"],"backgroundTag":"command-not-found","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}