jdx/mise · error
unable to determine version
Error message
unable to determine {} version What it means
initialize runs `<preset binary> --version` to determine the major version used for the version marker file; if the command exits with a non-success status, mise cannot determine the binary's version and bails out.
Solutions
- Run `<binary> --version` manually to see the actual failure and fix the installation
- Reinstall the tool version providing the binary (e.g. `mise install postgres`)
- Fix PATH so a working binary is selected
Example fix
// before: broken install $ postgres --version && echo ok # exits non-zero // after mise install postgres@16 && mise daemon start
Defensive patterns
Strategy: try-catch
Validate before calling
# pre-check the binary works "$HOME/.local/share/mise/installs/postgres/*/bin/postgres" --version || echo 'binary broken'
Try / catch
catch (e) { if (/unable to determine .* version/.test(e.message)) { reinstallTool(); } } Prevention
- Run `mise doctor` if tools misbehave
- Reinstall tool versions after OS upgrades
- Don't shadow mise-installed binaries with broken wrappers
When it happens
Trigger: The preset binary exists but `--version` exits non-zero (crash, bad install, missing libraries, permission problem) during daemon data initialization.
Common situations: Broken or partially installed postgres in the mise tool directory; binary fails due to missing shared libraries; wrong binary resolved on PATH.
Related errors
- another daemon profile is active for
- apk info failed
- apt-cache policy failed
- command failed: #
- daemon presets are not supported on Windows yet
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/502c0d9d19956dd6.
Report an issue: GitHub.
Appendix: source
Thrown at src/daemons/presets.rs:190
}
Ok(major.into())
}
pub(crate) fn initialize(preset_name: &str, data: &Path, database: &str) -> Result<()> {
crate::config::Settings::get().ensure_experimental("daemon presets")?;
crate::config::Settings::ensure_not_safe("initializing daemon data")?;
if cfg!(windows) {
bail!("daemon presets are not supported on Windows yet");
}
let preset = preset(preset_name)?;
let parent = data
.parent()
.ok_or_else(|| eyre::eyre!("daemon data must have a parent directory"))?;
std::fs::create_dir_all(parent)?;
let _lock = crate::lock_file::LockFile::new(data).lock()?;
let output = Command::new(&preset.binary).arg("--version").output()?;
if !output.status.success() {
bail!("unable to determine {} version", preset.binary);
}
let major = major(preset_name, &String::from_utf8(output.stdout)?)?;
let marker = format!("{preset_name}:{major}\n");
if data.exists() {
let existing = std::fs::read_to_string(data.join(".mise-daemon-version"))
.wrap_err("daemon data was not initialized completely; inspect it and migrate or reset it explicitly")?;
if existing != marker {
bail!(
"incompatible {preset_name} data in {} (stored {}, current {}); migrate or reset it explicitly",
data.display(),
existing.trim(),
marker.trim()
);
}
if preset_name == "postgres"
&& std::fs::read_to_string(data.join("PG_VERSION"))
.wrap_err("daemon data was not initialized completely; missing PG_VERSION")?
.trim()View on GitHub (pinned to 533346cc37)