Installing k9s fails

I’m trying to install k9s. flox can find it:

flox show k9s
k9s - Kubernetes CLI To Manage Your Clusters In Style
    k9s - k9s@0.28.2

but cannot install it:

❯ flox install -d $FLOX/ockam k9s
❌ ERROR: Could not find package k9s.

Here are a few other similar options:
  $ flox install k9s
...or see up to 1 options with 'flox search k9s'

What can I do?

can you send the results of the command with -vvvvvv output?

what happens if you flox update && flox upgrade and try again?

I did the update / upgrade but I still can’t install. Here’s the output of the command

2024-05-17T07:50:31.136412Z DEBUG flox: set _FLOX_PKGDB_VERBOSITY=6
2024-05-17T07:50:31.137659Z TRACE mio::poll: registering event source with poller: token=Token(1), interests=READABLE
2024-05-17T07:50:31.137659Z TRACE mio::poll: registering event source with poller: token=Token(1), interests=READABLE
2024-05-17T07:50:31.138822Z DEBUG flox::config: reading raw config (initialized: false, reload: false)
2024-05-17T07:50:31.138937Z DEBUG flox::config: `$FLOX_CONFIG_DIR` not set, using "/Users/etorreborre/.config/flox/"
2024-05-17T07:50:31.145681Z DEBUG flox::commands: Metrics collection enabled
2024-05-17T07:50:31.148746Z DEBUG flox::utils::init::catalog_client: catalog feature is disabled, skipping client initialization
2024-05-17T07:50:31.148810Z DEBUG flox::utils::init::metrics: Attempting to read own UUID from file
2024-05-17T07:50:31.149854Z TRACE install: flox_command: subcommand="install"
2024-05-17T07:50:31.150069Z DEBUG install: flox::utils::metrics: pushing entry to metrics buffer: MetricEntry { subcommand: Some("install"), extras: {}, timestamp: 2024-05-17 7:50:31.149862 +00:00:00, uuid: 6c82a68a-5d55-4864-a49d-c8b670d32b0f, flox_version: "1.0.5", os_family: Some("Mac OS"), os_family_release: Some("23.2.0"), os: None, os_version: None, empty_flags: [] }
2024-05-17T07:50:31.150287Z DEBUG install: flox::commands::install: installing packages [k9s] to Dir("/Users/etorreborre/.local/state/flox/ockam")
2024-05-17T07:50:31.150841Z DEBUG install: flox::commands: detected concrete environment type: managed
2024-05-17T07:50:31.151123Z DEBUG install: flox_rust_sdk::models::floxmeta: using configured FloxHub token
2024-05-17T07:50:31.151133Z DEBUG install: flox_rust_sdk::providers::git: attempting to open repo: path=/Users/etorreborre/.local/share/flox/meta/etorreborre
2024-05-17T07:50:31.151213Z DEBUG install: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -C /Users/etorreborre/.local/share/flox/meta/etorreborre rev-parse --is-bare-repository
2024-05-17T07:50:31.163929Z DEBUG install: flox_rust_sdk::providers::git: determining path to git repo
2024-05-17T07:50:31.163947Z DEBUG install: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.local/share/flox/meta/etorreborre rev-parse --absolute-git-dir
2024-05-17T07:50:31.167911Z DEBUG install: flox_rust_sdk::providers::git: got non-canonical path: path=/Users/etorreborre/.local/share/flox/meta/etorreborre
2024-05-17T07:50:31.167943Z DEBUG install: flox_rust_sdk::providers::git: canonicalized path: path=/Users/etorreborre/.local/share/flox/meta/etorreborre
2024-05-17T07:50:31.167967Z DEBUG install: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.local/share/flox/meta/etorreborre show-ref --hash refs/heads/ockam
2024-05-17T07:50:31.180360Z DEBUG install: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.local/share/flox/meta/etorreborre rev-parse --quiet --verify 'bc845548238bdaaea7edea7df023d32bc96c0f80^{commit}'
2024-05-17T07:50:31.185637Z DEBUG install: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.local/share/flox/meta/etorreborre show-ref --hash refs/heads/ockam.9c6cb214
2024-05-17T07:50:31.246491Z DEBUG flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' clone --single-branch --no-tags --branch ockam.9c6cb214 /Users/etorreborre/.local/share/flox/meta/etorreborre /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmppbL9bK
⠚ Installing packages to environment 'etorreborre/ockam'...                                                                                                                                                                                                                                                                                                                                                                                 2024-05-17T07:50:31.639105Z DEBUG flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmppbL9bK show 'ockam.9c6cb214:metadata.json'
2024-05-17T07:50:31.645134Z DEBUG flox_rust_sdk::models::manifest: attempting to insert packages into manifest
2024-05-17T07:50:31.645811Z DEBUG flox_rust_sdk::models::manifest: package newly installed: id=k9s, pkg-path=k9s
2024-05-17T07:50:31.645930Z DEBUG flox_rust_sdk::models::environment::core_environment: transaction: making temporary environment in /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpwDH3hB
2024-05-17T07:50:31.646153Z DEBUG flox_rust_sdk::models::environment::core_environment: transaction: updating manifest
2024-05-17T07:50:31.646158Z DEBUG flox_rust_sdk::models::environment::core_environment: writing new manifest to /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpwDH3hB/manifest.toml
2024-05-17T07:50:31.646263Z DEBUG flox_rust_sdk::models::environment::core_environment: transaction: locking environment
2024-05-17T07:50:31.646637Z DEBUG flox_rust_sdk::models::environment::core_environment: using pkgdb to lock
2024-05-17T07:50:31.646660Z DEBUG flox_rust_sdk::models::environment::core_environment: found existing lockfile: /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpwDH3hB/manifest.lock
2024-05-17T07:50:31.646689Z DEBUG flox_rust_sdk::models::environment: global manifest path is /Users/etorreborre/.config/flox/global-manifest.toml
2024-05-17T07:50:31.646705Z DEBUG flox_rust_sdk::models::lockfile: locking manifest with command: /nix/store/l5vkcvhajkff16603byqg00wiyqm9356-flox-pkgdb-0.1.0/bin/pkgdb manifest lock --ga-registry --global-manifest /Users/etorreborre/.config/flox/global-manifest.toml --manifest /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpwDH3hB/manifest.toml --lockfile /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpwDH3hB/manifest.lock
2024-05-17T07:50:31.647023Z TRACE flox_rust_sdk::models::pkgdb: waiting for background threads to finish
2024-05-17T07:50:31.647042Z DEBUG flox_rust_sdk::models::pkgdb: reading pkgdb stdout
⠒ Installing packages to environment 'etorreborre/ockam'...                                                                                                                                                                                                                                                                                                                                                                                 2024-05-17T07:50:37.991064Z TRACE flox_rust_sdk::models::pkgdb: done waiting for background threads
2024-05-17T07:50:37.991080Z TRACE flox_rust_sdk::models::pkgdb: waiting for the pkgdb process to exit
2024-05-17T07:50:37.991441Z DEBUG install{packages="k9s"}: flox::commands::install: install error: Core(LockedManifest(LockManifest(PkgDbError(PkgDbError { exit_code: 120, category_message: "resolution failure", context_message: Some(ContextMsgError { message: "failed to resolve some package(s):\n  in 'toplevel': '\n    failed to resolve 'virtualenv' in input 'github:NixOS/nixpkgs/e3cd6c03dbfbd9975dd720195b5b87a1fb29fe6e'    failed to resolve 'awscli2' in input 'github:NixOS/nixpkgs/60f80cff5cc3185eba37a260a06399300dfdcffd'", caught: None }) }))))
2024-05-17T07:50:37.991479Z TRACE install{packages="k9s"}: flox_command: subcommand="install" failed_packages="k9s"
2024-05-17T07:50:37.991857Z DEBUG install{packages="k9s"}: flox::utils::metrics: pushing entry to metrics buffer: MetricEntry { subcommand: Some("install"), extras: {"failed_packages": "k9s"}, timestamp: 2024-05-17 7:50:37.991492 +00:00:00, uuid: 6c82a68a-5d55-4864-a49d-c8b670d32b0f, flox_version: "1.0.5", os_family: Some("Mac OS"), os_family_release: Some("23.2.0"), os: None, os_version: None, empty_flags: [] }
2024-05-17T07:50:37.997092Z DEBUG install{packages="k9s"}: flox::commands::install: attempting to make install suggestion
2024-05-17T07:50:37.997805Z DEBUG install{packages="k9s"}: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' clone --single-branch --no-tags --branch ockam.9c6cb214 /Users/etorreborre/.local/share/flox/meta/etorreborre /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpMVyFN5/.tmp1s6Eim
2024-05-17T07:50:38.365678Z DEBUG install{packages="k9s"}: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpMVyFN5/.tmp1s6Eim show 'ockam.9c6cb214:metadata.json'
2024-05-17T07:50:38.370679Z DEBUG install{packages="k9s"}: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' clone --single-branch --no-tags --branch ockam.9c6cb214 /Users/etorreborre/.local/share/flox/meta/etorreborre /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpVb05R4/.tmpfoHqym
2024-05-17T07:50:38.727209Z DEBUG install{packages="k9s"}: flox_rust_sdk::providers::git: running git command: /nix/store/p9i7qfwxgchxbvxprcdbjqiqx73kqz39-git-minimal-2.42.0/bin/git -c 'credential.https://api.flox.dev/git.helper='\!'f(){ echo "username=oauth"; echo "password=$FLOX_FLOXHUB_TOKEN"; }; f' -c 'remote.dynamicorigin.url=https://api.flox.dev/git/etorreborre/floxmeta' -c 'user.email=floxuser@example.invalid' -c 'user.name=Flox User' -C /Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpVb05R4/.tmpfoHqym show 'ockam.9c6cb214:metadata.json'
2024-05-17T07:50:38.731851Z DEBUG install{packages="k9s"}: flox_rust_sdk::models::environment: global manifest path is /Users/etorreborre/.config/flox/global-manifest.toml
2024-05-17T07:50:38.731881Z DEBUG install{packages="k9s"}: flox::config: reading raw config (initialized: true, reload: false)
2024-05-17T07:50:38.731909Z DEBUG install{packages="k9s"}: flox::utils::search: search params raw: SearchParams { manifest: Some(Path("/Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpVb05R4/.tmpfoHqym/83/env/manifest.toml")), global_manifest: Path("/Users/etorreborre/.config/flox/global-manifest.toml"), lockfile: Path("/Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpMVyFN5/.tmp1s6Eim/83/env/manifest.lock"), query: Query { name: None, pname: None, rel_path: None, version: None, semver: None, match: None, match_name: None, match_name_or_rel_path: Some("k9s"), limit: Some(3), deduplicate: true } }
⠁ Could not find package for k9s. Looking for suggestions...                                                                                                                                                                                                                                                                                                                                                                                2024-05-17T07:50:38.731992Z DEBUG flox_rust_sdk::models::search: running search command /nix/store/l5vkcvhajkff16603byqg00wiyqm9356-flox-pkgdb-0.1.0/bin/pkgdb search --ga-registry '{"manifest":"/Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpVb05R4/.tmpfoHqym/83/env/manifest.toml","global-manifest":"/Users/etorreborre/.config/flox/global-manifest.toml","lockfile":"/Users/etorreborre/.cache/flox/process/.tmpYsu6iw/.tmpMVyFN5/.tmp1s6Eim/83/env/manifest.lock","query":{"match-name-or-rel-path":"k9s","limit":3,"deduplicate":true}}'
⠙ Could not find package for k9s. Looking for suggestions...                                                                                                                                                                                                                                                                                                                                                                                2024-05-17T07:50:38.992442Z DEBUG flox_rust_sdk::models::search: result count = 1
2024-05-17T07:50:38.992671Z DEBUG flox_rust_sdk::models::search: search result = SearchResult { input: "nixpkgs", system: "aarch64-darwin", rel_path: ["k9s"], pname: Some("k9s"), version: Some("0.28.2"), description: Some("Kubernetes CLI To Manage Your Clusters In Style"), license: Some("Apache-2.0") }
2024-05-17T07:50:38.993959Z TRACE flox_rust_sdk::models::search: stderr reader thread is done
2024-05-17T07:50:38.993965Z TRACE flox_rust_sdk::models::search: stdout reader thread is done
2024-05-17T07:50:38.993978Z TRACE flox_rust_sdk::models::search: joining reader threads
2024-05-17T07:50:38.993995Z TRACE flox_rust_sdk::models::search: done joining reader threads
2024-05-17T07:50:38.996063Z DEBUG flox: Could not find package k9s.

Here are a few other similar options:
  $ flox install k9s
...or see up to 1 options with 'flox search k9s'

❌ ERROR: Could not find package k9s.

Here are a few other similar options:
  $ flox install k9s
...or see up to 1 options with 'flox search k9s'

2024-05-17T07:50:38.996667Z DEBUG sentry: dropping client guard -> disposing client
2024-05-17T07:50:38.996696Z DEBUG sentry: client close; request transport to shut down
2024-05-17T07:50:38.996841Z TRACE hyper_util::client::legacy::pool: checkout waiting for idle connection: ("https", o4506548203094016.ingest.us.sentry.io)
2024-05-17T07:50:38.997567Z DEBUG reqwest::connect: starting new connection: https://o4506548203094016.ingest.us.sentry.io/
2024-05-17T07:50:38.997598Z TRACE hyper_util::client::legacy::connect::http: Http::connect; scheme=Some("https"), host=Some("o4506548203094016.ingest.us.sentry.io"), port=None
2024-05-17T07:50:38.997666Z DEBUG hyper_util::client::legacy::connect::dns: resolving host="o4506548203094016.ingest.us.sentry.io"
2024-05-17T07:50:38.999725Z DEBUG hyper_util::client::legacy::connect::http: connecting to 34.120.195.249:443
2024-05-17T07:50:38.999855Z TRACE mio::poll: registering event source with poller: token=Token(5041591040), interests=READABLE | WRITABLE
2024-05-17T07:50:39.016182Z DEBUG hyper_util::client::legacy::connect::http: connected to 34.120.195.249:443
2024-05-17T07:50:39.064766Z TRACE hyper_util::client::legacy::client: http1 handshake complete, spawning background dispatcher task
2024-05-17T07:50:39.064979Z TRACE hyper_util::client::legacy::pool: checkout dropped for ("https", o4506548203094016.ingest.us.sentry.io)
2024-05-17T07:50:39.092306Z TRACE hyper_util::client::legacy::pool: put; add idle connection for ("https", o4506548203094016.ingest.us.sentry.io)
2024-05-17T07:50:39.092328Z DEBUG hyper_util::client::legacy::pool: pooling idle connection for ("https", o4506548203094016.ingest.us.sentry.io)
2024-05-17T07:50:39.092540Z DEBUG sentry: Get response: `{"id":"99481a6915e643deb726b47f73ba20b1"}`
2024-05-17T07:50:39.092567Z TRACE mio::poll: deregistering event source from poller

The error seems to be

flox::commands::install: install error: Core(LockedManifest(LockManifest(PkgDbError(PkgDbError { exit_code: 120, category_message: "resolution failure", context_message: Some(ContextMsgError { message: "failed to resolve some package(s):\n  in 'toplevel': '\n    failed to resolve 'virtualenv' in input 'github:NixOS/nixpkgs/e3cd6c03dbfbd9975dd720195b5b87a1fb29fe6e'    failed to resolve 'awscli2' in input 'github:NixOS/nixpkgs/60f80cff5cc3185eba37a260a06399300dfdcffd'", caught: None }) }))))

@ghudgins I think that this is related with my install of awscli2 from the unstable packages. If I remove that version from my environment then I can install k9s.

hmm, I tried that workaround and I’m still able to install as k9s seems to be in both.

that being said we’re getting very close to a release that will make it much easier to attach different nixpkgs revisions containing different packages vs having to hard code the one you want!

1 Like