ipfs/kubo · error

could not find ipfs binary in archive (expected kubo/%s): ta

Error message

could not find ipfs binary in archive (expected kubo/%s): tar.gz: %v, zip: %v

What it means

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.

Source

Thrown at core/commands/update.go:761

	return f.Name(), nil
}

// extractBinaryFromArchive extracts the kubo/ipfs binary from a tar.gz or zip archive.
func extractBinaryFromArchive(data []byte) ([]byte, error) {
	binName := migrations.ExeName("ipfs")

	// Try tar.gz first (Unix releases), then zip (Windows releases).
	result, tarErr := extractFromTarGz(data, binName)
	if tarErr == nil {
		return result, nil
	}

	result, zipErr := extractFromZip(data, binName)
	if zipErr == nil {
		return result, nil
	}

	return nil, fmt.Errorf("could not find ipfs binary in archive (expected kubo/%s): tar.gz: %v, zip: %v", binName, tarErr, zipErr)
}

func extractFromTarGz(data []byte, binName string) ([]byte, error) {
	gzr, err := gzip.NewReader(bytes.NewReader(data))
	if err != nil {
		return nil, err
	}
	defer gzr.Close()

	tr := tar.NewReader(gzr)
	lookFor := "kubo/" + binName
	for {
		hdr, err := tr.Next()
		if errors.Is(err, io.EOF) {
			break
		}
		if err != nil {
			return nil, err

View on GitHub (pinned to 329838acdf)

Solutions

  1. Retry the update; a truncated download is the most common cause
  2. Check network/proxy settings that could mangle binary downloads
  3. If it persists, download the release archive manually from dist.ipfs.tech and install by hand
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at core/commands/update.go:761 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03). Data as JSON: /api/errors/4edd9adc87a2e471. Report an issue: GitHub.