{"record":{"id":"95aac023152302d6","repo":"sxyazi/yazi","slug":"failed-to-start-either-7zz-or-7z-error","errorCode":null,"errorMessage":"Failed to start either `7zz` or `7z`, error: ","messagePattern":"Failed to start either `7zz` or `7z`, error: ","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"yazi-plugin/preset/plugins/archive.lua","lineNumber":71,"sourceCode":"\t})\nend\n\nfunction M:seek(job) require(\"code\"):seek(job) end\n\nfunction M.spawn_7z(args)\n\tlocal last_err = nil\n\tlocal try = function(name)\n\t\tlocal stdout = args[1] == \"l\" and Command.PIPED or Command.NULL\n\t\tlocal child, err = Command(name):arg(args):stdout(stdout):stderr(Command.PIPED):spawn()\n\t\tif not child then\n\t\t\tlast_err = err\n\t\tend\n\t\treturn child\n\tend\n\n\tlocal child = try(\"7zz\") or try(\"7z\")\n\tif not child then\n\t\treturn ya.err(\"Failed to start either `7zz` or `7z`, error: \" .. last_err)\n\tend\n\treturn child, last_err\nend\n\n-- Spawn a 7z instance which pipes a \"7z {src_args}\" into a \"7z {dst_args}\"\n-- Used for previewing compressed tarballs, by doing \"7z x -so .. | 7z l -si ..\"\nfunction M.spawn_7z_piped(src_args, dst_args)\n\tlocal last_err = nil\n\tlocal try = function(name)\n\t\tlocal src, err = Command(name):arg(src_args):stdout(Command.PIPED):stderr(Command.PIPED):spawn()\n\t\tif not src then\n\t\t\tlast_err = err\n\t\t\treturn src\n\t\tend\n\t\tlocal dst, err =\n\t\t\tCommand(name):arg(dst_args):stdin(src:take_stdout()):stdout(Command.PIPED):stderr(Command.PIPED):spawn()\n\t\tif not dst then\n\t\t\tlast_err = err","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/sxyazi/yazi/blob/441b332de8b8800e70784cfbfb75369ab51ed9dd/yazi-plugin/preset/plugins/archive.lua#L53-L89","documentation":"Error \"Failed to start either `7zz` or `7z`, error: \" thrown in sxyazi/yazi.","triggerScenarios":"Thrown at yazi-plugin/preset/plugins/archive.lua:71 when the library encounters an invalid state.","commonSituations":"Using archive operations without `7zz` or `7z` installed, or with a binary that fails to spawn.","solutions":["Install a 7-Zip binary (`7zz` or `7z`) and ensure it is on PATH so the archive plugin can run."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"441b332de8b8800e70784cfbfb75369ab51ed9dd","analyzedAt":"2026-08-19T05:27:26.468Z","contentChangedAt":"2026-08-19T05:27:26.468Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}