tonhowtf/omniget · error
LibreOffice nao encontrado
Error message
LibreOffice nao encontrado
What it means
Raised when `find_soffice()` cannot locate the LibreOffice `soffice` executable, which is required for document conversion. The function bails out early with this message instead of proceeding to conversion. LibreOffice is an optional external dependency, not bundled with the app.
Solutions
- Install LibreOffice (`apt install libreoffice`, brew, or official installer)
- Add the soffice binary directory to PATH if installed in a custom location
- Check the app's dependency manager screen (Ajustes → Dependências) for bundled install
- Verify `soffice --version` runs in a terminal
Example fix
// before
let out = convert_with_office(files, "docx", dir, progress).await?;
// after
if find_soffice().await.is_none() {
eprintln!("LibreOffice ausente; instale-o antes de converter");
return Ok(vec![]);
}
let out = convert_with_office(files, "docx", dir, progress).await?; Defensive patterns
Strategy: validation
Validate before calling
// Rust: probe for soffice before conversion
let soffice = find_soffice().await;
if soffice.is_none() {
eprintln!("Instale o LibreOffice para conversao de documentos");
} Prevention
- Check for soffice during app startup and show a dependency prompt
- Document LibreOffice as an optional requirement in your install docs
- In Docker/CI, install libreoffice in the image explicitly
- Allow users to configure a custom soffice path in settings
When it happens
Trigger: Calling the LibreOffice conversion API (e.g. convert to docx/odt/pptx/epub) on a machine where LibreOffice is not installed or `soffice` is not discoverable in standard install locations / PATH.
Common situations: Fresh CI containers or minimal Docker images without LibreOffice, macOS/Linux installs in non-standard prefixes not covered by the lookup paths, Windows installs without LibreOffice in Program Files.
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
- ffmpeg nao iniciou
- formato nao suportado
- HTML para Markdown
- LibreOffice nao converteu
- o yt-dlp não está instalado
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/43dddbd37382ff0d.
Report an issue: GitHub.
Appendix: source
Thrown at src-tauri/omniget-core/src/core/tools/pdf.rs:1321
report(&progress, "done", pages as u64, Some(pages as u64), None);
Ok(PdfOut {
output: output.to_string_lossy().to_string(),
pages,
bytes,
})
}
// ── LibreOffice (PDF ↔ Office) ─────────────────────────────────────────
pub async fn office_convert(
inputs: Vec<String>,
target: String,
output_dir: String,
progress: super::ProgressFn,
) -> anyhow::Result<Vec<String>> {
let soffice = find_soffice()
.await
.ok_or_else(|| anyhow!("LibreOffice nao encontrado"))?;
let target = target.trim().trim_start_matches('.').to_ascii_lowercase();
if !matches!(
target.as_str(),
"docx" | "odt" | "pptx" | "xlsx" | "pdf" | "html" | "txt" | "epub"
) {
return Err(anyhow!("formato nao suportado: {}", target));
}
let mut outputs = Vec::new();
let n = inputs.len() as u64;
for (i, input) in inputs.iter().enumerate() {
report(
&progress,
"progress",
i as u64,
Some(n),
Some(input.clone()),
);
let input_path = PathBuf::from(input.trim());View on GitHub (pinned to 8600b91f42)