tonhowtf/omniget · error
aria2c nao esta instalado (Linux/macOS: instale pelo…
Error message
aria2c nao esta instalado (Linux/macOS: instale pelo gerenciador de pacotes)
What it means
The aria2 download() driver first calls ensure_aria2c() to locate the aria2c binary; if it returns None (binary not found and could not be provisioned) download() fails with this message indicating aria2c is not installed and should be installed via the system package manager on Linux/macOS. It is a pre-flight dependency check, thrown before any download starts.
Solutions
- Install aria2 via the package manager: sudo apt install aria2 (Debian/Ubuntu), brew install aria2 (macOS), dnf install aria2 (Fedora).
- Verify with `which aria2c` that the binary is on PATH for the app's environment (GUI apps may not inherit shell PATH).
- If the app can auto-download the binary, check disk space/permissions that may make ensure_aria2c() return None, then retry.
- Alternatively switch the download to the non-aria2 HTTP engine if the app offers one.
Example fix
// before $ omniget download <url> // fails: aria2c not found // after $ brew install aria2 # or: sudo apt install aria2 $ which aria2c # /opt/homebrew/bin/aria2c $ omniget download <url> # works
Defensive patterns
Strategy: fallback
Validate before calling
// probe for aria2c before starting a download
if which::which("aria2c").is_err() {
eprintln!("aria2c missing — install with 'apt install aria2' or 'brew install aria2'");
// fall back to the plain HTTP engine if available
} Type guard
fn aria2_available() -> bool { which::which("aria2c").is_ok() } Try / catch
match download(&opts, progress).await {
Ok(res) => report(res),
Err(e) if e.to_string().contains("aria2c nao esta instalado") => {
eprintln!("install aria2 (apt/brew/dnf) or switch to the built-in HTTP downloader");
fallback_http_download(&opts).await?;
}
Err(e) => show_error(e),
} Prevention
- Install aria2 as part of app setup (apt install aria2 / brew install aria2)
- Verify `which aria2c` in the same environment the app runs in (GUI apps may have a different PATH)
- In containers, add aria2 to the Dockerfile
- Offer a non-aria2 fallback download path in the app
When it happens
Trigger: Calling download(opts, progress) on a system where aria2c is absent from PATH and the bundled/auto-install step (ensure_aria2c) failed or was skipped.
Common situations: Fresh Linux/macOS installs without aria2; minimal containers/Docker images lacking the binary; PATH not including the install location (e.g. Homebrew on Apple Silicon: /opt/homebrew/bin); Windows users without the aria2 exe in scope.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- Real-ESRGAN nao esta instalado
- aria2c falhou
- binario sumiu apos instalar
- Could not determine data directory
- download terminou mas nao achei o arquivo
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/4efbaa5189f39ac1.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/aria2.rs:67
}
}
/// `[#a1b2c3 12MiB/100MiB(12%) CN:16 DL:5.0MiB ETA:10s]`
pub fn parse_progress(line: &str) -> Option<(u64, String)> {
let re = regex::Regex::new(r"\((\d+)%\).*?DL:([^\s\]]+)").ok()?;
let c = re.captures(line)?;
Some((c[1].parse().ok()?, c[2].to_string()))
}
pub async fn download(
opts: Aria2Options,
progress: super::ProgressFn,
) -> anyhow::Result<Aria2Result> {
use tokio::io::{AsyncBufReadExt, BufReader};
let bin = crate::core::dependencies::ensure_aria2c()
.await
.ok_or_else(|| {
anyhow!("aria2c nao esta instalado (Linux/macOS: instale pelo gerenciador de pacotes)")
})?;
std::fs::create_dir_all(&opts.dest_dir)?;
let conns = opts.connections.clamp(1, 16).to_string();
let mut cmd = crate::core::process::command(&bin);
cmd.args([
"--dir",
&opts.dest_dir,
"-x",
&conns,
"-s",
&conns,
"-k",
"1M",
"--continue=true",
"--auto-file-renaming=false",
"--allow-overwrite=true",
"--summary-interval=1",
"--console-log-level=warn",View on GitHub (pinned to 8600b91f42)