sxyazi/yazi · error

Failed to start either `7zz` or `7z`, error:

Error message

Failed to start either `7zz` or `7z`, error: 

What it means

Error "Failed to start either `7zz` or `7z`, error: " thrown in sxyazi/yazi.

Source

Thrown at yazi-plugin/preset/plugins/archive.lua:71

	})
end

function M:seek(job) require("code"):seek(job) end

function M.spawn_7z(args)
	local last_err = nil
	local try = function(name)
		local stdout = args[1] == "l" and Command.PIPED or Command.NULL
		local child, err = Command(name):arg(args):stdout(stdout):stderr(Command.PIPED):spawn()
		if not child then
			last_err = err
		end
		return child
	end

	local child = try("7zz") or try("7z")
	if not child then
		return ya.err("Failed to start either `7zz` or `7z`, error: " .. last_err)
	end
	return child, last_err
end

-- Spawn a 7z instance which pipes a "7z {src_args}" into a "7z {dst_args}"
-- Used for previewing compressed tarballs, by doing "7z x -so .. | 7z l -si .."
function M.spawn_7z_piped(src_args, dst_args)
	local last_err = nil
	local try = function(name)
		local src, err = Command(name):arg(src_args):stdout(Command.PIPED):stderr(Command.PIPED):spawn()
		if not src then
			last_err = err
			return src
		end
		local dst, err =
			Command(name):arg(dst_args):stdin(src:take_stdout()):stdout(Command.PIPED):stderr(Command.PIPED):spawn()
		if not dst then
			last_err = err

View on GitHub (pinned to 441b332de8)

Solutions

  1. Install a 7-Zip binary (`7zz` or `7z`) and ensure it is on PATH so the archive plugin can run.

When it happens

Trigger: Thrown at yazi-plugin/preset/plugins/archive.lua:71 when the library encounters an invalid state.

Common situations: Using archive operations without `7zz` or `7z` installed, or with a binary that fails to spawn.


AI-assisted analysis of sxyazi/yazi@441b332de8 (2026-08-19). Data as JSON: /api/errors/95aac023152302d6. Report an issue: GitHub.