slimtoolkit/slim · error
dependency resolver not found
Error message
dependency resolver not found
What it means
ErrDepResolverNotFound is returned by sodeps.AllDependencies when exec.LookPath cannot find the dependency resolver executable (ldd) on PATH. The shared-object dependency inspection depends on ldd being installed in the environment where the sensor runs.
Source
Thrown at pkg/app/sensor/inspector/sodeps/sodeps.go:20
import (
"bytes"
"errors"
"os"
"os/exec"
"path/filepath"
"strings"
"github.com/slimtoolkit/slim/pkg/app/sensor/detector/binfile"
log "github.com/sirupsen/logrus"
)
// Inspector errors
var (
ErrFilePathNotAbs = errors.New("file path is not absolute")
ErrFileNotBin = errors.New("file is not a binary")
ErrDepResolverNotFound = errors.New("dependency resolver not found")
)
const (
resolverExeName = "ldd"
)
func AllExeDependencies(exeFileName string, find bool) ([]string, error) {
if !strings.HasPrefix(exeFileName, "/") {
if !find {
return nil, ErrFilePathNotAbs
}
exePath, err := exec.LookPath(exeFileName)
if err != nil {
return nil, err
}
exeFileName = exePathView on GitHub (pinned to 81940d17fa)
Solutions
- Install ldd (glibc tooling, e.g., apk add glibc / apt-get install libc-bin) in the environment running the sensor
- Ensure PATH includes the directory containing ldd when launching the sensor
- Use an image variant with standard libc utilities for probing
- Fall back to static dependency analysis if ldd cannot be provided
Example fix
# before FROM alpine RUN apk add --no-cache ca-certificates # after FROM alpine RUN apk add --no-cache ca-certificates glibc libc6-compat # provides ldd/ld-linux
Defensive patterns
Strategy: validation
Validate before calling
// Go: verify ldd is available before dependency analysis
if _, err := exec.LookPath("ldd"); err != nil {
return fmt.Errorf("ldd must be installed in the probe environment")
} Prevention
- Install glibc tooling (ldd) in images used for dynamic analysis
- Keep PATH intact when launching the sensor
- Prefer standard base images for probing rather than scratch/minimal ones
When it happens
Trigger: Running the sensor in a minimal container image (distroless, scratch, alpine without libc tooling) that lacks ldd; PATH stripped so LookPath fails.
Common situations: Analyzing slim/minimal images during dynamic analysis; containers built FROM scratch; alpine images with musl but no ldd installed; restricted PATH env in production images.
Related errors
- file path is not absolute
- file is not a binary
- no docker info
- docker socket not found
- sensor shutdown before monitor stop
AI-assisted analysis of slimtoolkit/slim@81940d17fa (2026-08-31).
Data as JSON: /api/errors/2ce8a1c7081b055f.
Report an issue: GitHub.