{"record":{"id":"4edd9adc87a2e471","repo":"ipfs/kubo","slug":"could-not-find-ipfs-binary-in-archive-expected-ku","errorCode":null,"errorMessage":"could not find ipfs binary in archive (expected kubo/%s): tar.gz: %v, zip: %v","messagePattern":"could not find ipfs binary in archive \\(expected kubo/(.+?)\\): tar\\.gz: (.+?), zip: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/update.go","lineNumber":761,"sourceCode":"\treturn f.Name(), nil\n}\n\n// extractBinaryFromArchive extracts the kubo/ipfs binary from a tar.gz or zip archive.\nfunc extractBinaryFromArchive(data []byte) ([]byte, error) {\n\tbinName := migrations.ExeName(\"ipfs\")\n\n\t// Try tar.gz first (Unix releases), then zip (Windows releases).\n\tresult, tarErr := extractFromTarGz(data, binName)\n\tif tarErr == nil {\n\t\treturn result, nil\n\t}\n\n\tresult, zipErr := extractFromZip(data, binName)\n\tif zipErr == nil {\n\t\treturn result, nil\n\t}\n\n\treturn nil, fmt.Errorf(\"could not find ipfs binary in archive (expected kubo/%s): tar.gz: %v, zip: %v\", binName, tarErr, zipErr)\n}\n\nfunc extractFromTarGz(data []byte, binName string) ([]byte, error) {\n\tgzr, err := gzip.NewReader(bytes.NewReader(data))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer gzr.Close()\n\n\ttr := tar.NewReader(gzr)\n\tlookFor := \"kubo/\" + binName\n\tfor {\n\t\thdr, err := tr.Next()\n\t\tif errors.Is(err, io.EOF) {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\treturn nil, err","sourceCodeStart":743,"sourceCodeEnd":779,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/update.go#L743-L779","documentation":"The release archive downloaded by 'ipfs update' contained neither the expected kubo/<binary> entry as tar.gz nor as zip; both extraction attempts failed and their errors are reported. Usually a corrupted/truncated download or an unexpected archive layout for the fetched version.","triggerScenarios":"Thrown at core/commands/update.go:761 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the update; a truncated download is the most common cause","Check network/proxy settings that could mangle binary downloads","If it persists, download the release archive manually from dist.ipfs.tech and install by hand"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}