From a9fcef4579cbbf0a0ebd4374459cd0b2c221f569 Mon Sep 17 00:00:00 2001 From: Mikhail Beliakov Date: Sun, 18 Jan 2026 20:50:57 +0400 Subject: [PATCH] fix: support libasound2t64 on newer Ubuntu versions (#112) * fix: support libasound2t64 on newer Ubuntu versions Updates the install logic to check if `libasound2t64` is available using `apt-cache` before falling back to `libasound2`. This fixes installation on Ubuntu 24.04 and other systems affected by the 64-bit time_t transition. * Update cli/src/install.rs Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> --- cli/src/install.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/cli/src/install.rs b/cli/src/install.rs index 09b5929..334cea3 100644 --- a/cli/src/install.rs +++ b/cli/src/install.rs @@ -9,6 +9,12 @@ pub fn run_install(with_deps: bool) { println!("{}", color::cyan("Installing system dependencies...")); let (pkg_mgr, deps) = if which_exists("apt-get") { + let libasound = if package_exists_apt("libasound2t64") { + "libasound2t64" + } else { + "libasound2" + }; + ( "apt-get", vec![ @@ -31,7 +37,7 @@ pub fn run_install(with_deps: bool) { "libcairo2", "libgdk-pixbuf-2.0-0", "libxrender1", - "libasound2", + libasound, "libfreetype6", "libfontconfig1", "libdbus-1-3", @@ -191,3 +197,14 @@ fn which_exists(cmd: &str) -> bool { .unwrap_or(false) } } + +fn package_exists_apt(pkg: &str) -> bool { + Command::new("apt-cache") + .arg("show") + .arg(pkg) + .stdout(Stdio::null()) + .stderr(Stdio::null()) + .status() + .map(|s| s.success()) + .unwrap_or(false) +}