ipfs/kubo · error
no embedded dependency information
Error message
no embedded dependency information
What it means
The 'ipfs version deps' command reads Go module dependency info embedded in the binary via debug.ReadBuildInfo(). If the runtime cannot provide build info, this error is returned. Build info is only embedded when the binary was built with the Go toolchain (go build); it is absent for binaries built by other means or manipulated afterwards.
Source
Thrown at core/commands/version.go:110
Version string
ReplacedBy string
Sum string
}
const pkgVersionFmt = "%s@%s"
var depsVersionCommand = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Shows information about dependencies used for build.",
ShortDescription: `
Print out all dependencies and their versions.`,
},
Type: Dependency{},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
info, ok := debug.ReadBuildInfo()
if !ok {
return errors.New("no embedded dependency information")
}
toDependency := func(mod *debug.Module) (dep Dependency) {
dep.Path = mod.Path
dep.Version = mod.Version
dep.Sum = mod.Sum
if repl := mod.Replace; repl != nil {
dep.ReplacedBy = fmt.Sprintf(pkgVersionFmt, repl.Path, repl.Version)
}
return
}
if err := res.Emit(toDependency(&info.Main)); err != nil {
return err
}
for _, dep := range info.Deps {
if err := res.Emit(toDependency(dep)); err != nil {
return err
}
}View on GitHub (pinned to 329838acdf)
Solutions
- Rebuild the binary from source with the standard toolchain: make build (which uses go build)
- Verify the binary is an official release artifact and not a repackaged/stripped one
- If you need dependency info without build info, run 'go version -m ./ipfs' against the binary or check the source go.mod
Example fix
// before
info, ok := debug.ReadBuildInfo()
if !ok {
return errors.New("no embedded dependency information")
}
// after (caller-side mitigation)
out, err := exec.Command("go", "version", "-m", ipfsBinaryPath).Output() Defensive patterns
Strategy: fallback
Validate before calling
if info, ok := debug.ReadBuildInfo(); !ok || len(info.Deps) == 0 {
// fall back to 'go version -m <binary>' or packaged metadata
} Try / catch
deps, err := runVersionDeps()
if err != nil && strings.Contains(err.Error(), "no embedded dependency information") {
out, exeErr := exec.Command("go", "version", "-m", ipfsBin).Output()
if exeErr == nil { fmt.Println(string(out)); return nil }
}
return err Prevention
- Build with the standard go toolchain (make build)
- Don't repackage or strip binaries in ways that drop build info
- Document in your packaging pipeline that 'ipfs version deps' needs go-embedded build info
When it happens
Trigger: Running 'ipfs version deps' on a binary that was not built with the standard Go toolchain — e.g. built with -trimpath oddities is fine, but stripped/patched binaries, binaries produced by alternative toolchains, or test harnesses that don't embed build info will return ok=false.
Common situations: Distributing a binary built with a non-Go builder or heavily stripped packaging pipeline; running the command in a sandbox that replaced the ipfs binary; using a binary compiled from a modified build script that bypasses the go command.
Related errors
- supernode routing was never fully implemented and has been r
- unrecognized routing option: %s
- invalid configuration profile: %s
- command disabled: %v
- api flag specified but command cannot be run on the daemon
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/92018862bc4fc3af.
Report an issue: GitHub.