diff --git a/src/virtual_packages.rs b/src/virtual_packages.rs index 6205708cd..ef0d600fb 100644 --- a/src/virtual_packages.rs +++ b/src/virtual_packages.rs @@ -183,7 +183,11 @@ pub fn verify_current_platform_has_required_virtual_packages( } if req_pkg.version > local_vpkg.version { - miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be at least version '{}' but the system has version '{}'", req_pkg.name.as_source(), req_pkg.version, local_vpkg.version); + // This case can simply happen because the default system requirements in get_minimal_virtual_packages() is higher than required. + miette::bail!("The current system has a mismatching virtual package. The project requires '{}' to be at least version '{}' but the system has version '{}'\n\n\ + Try setting the following in your pixi.toml:\n\ + [system-requirements]\n\ + {} = \"{}\"", req_pkg.name.as_source(), req_pkg.version, local_vpkg.version, req_pkg.name.as_normalized().strip_prefix("__").unwrap_or(local_vpkg.name.as_normalized()), local_vpkg.version); } } else { miette::bail!("The platform you are running on should at least have the virtual package {} on version {}, build_string: {}", req_pkg.name.as_source(), req_pkg.version, req_pkg.build_string)