Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

microk8s installation fails with "cannot execute: required file not found" error #4709

Open
sibman opened this issue Oct 20, 2024 · 1 comment

Comments

@sibman
Copy link

sibman commented Oct 20, 2024

Description:
When attempting to install MicroK8s using Snap on a Linux machine, the installation fails during the install hook with the following error:

bash
Copy code
$ sudo snap install microk8s --classic
error: cannot perform the following tasks:

  • Run install hook of "microk8s" snap if present (run hook "install":

  • source /snap/microk8s/7232/actions/common/utils.sh
    ...
  • mkdir -p /var/snap/microk8s/common/run
    /snap/microk8s/7232/actions/common/utils.sh: line 1392: /snap/microk8s/7232/bin/mkdir: cannot execute: required file not found

)
Steps to Reproduce:
Run the following command on a Linux machine:
bash
Copy code
sudo snap install microk8s --classic
Observe the error message during installation.
Expected Behavior:
The MicroK8s snap should install successfully without errors.

Actual Behavior:
The installation fails with the following error message:

bash
Copy code
/snap/microk8s/7232/actions/common/utils.sh: line 1392: /snap/microk8s/7232/bin/mkdir: cannot execute: required file not found
Environment:
OS: (Linux Mint 22 (Ubuntu 22.04 LTS))
Snap Version: snap --version 2.65.3+24.04
Snapd Version: snapd --version 2.65.3+24.04
MicroK8s Version: (Attempted with the version from the stable channel)
Shell: (e.g., Bash)
Troubleshooting Steps Tried:
Reinstall Snapd:
bash
Copy code
sudo apt update && sudo apt install --reinstall snapd
Ensure Snapd Services Are Running:
bash
Copy code
sudo systemctl restart snapd
sudo systemctl status snapd
Check Permissions: Verified permissions for /var/snap/microk8s.
Switch to Another Channel: Tried different versions using:
bash
Copy code
sudo snap install microk8s --classic --channel=latest/stable
snap install microk8s --classic --channel=1.31/stable
Possible Cause:
It seems the install hook script is trying to call the mkdir binary from within the MicroK8s snap at /snap/microk8s/7232/bin/mkdir, but this file is either missing or not executable. This might indicate:

A corrupted or incomplete snap package.
A broken link or missing dependency in the snap package.
Request for Assistance:
Could this be a packaging issue with the current MicroK8s release?
Are there any known workarounds to resolve the issue?
Any suggestions on how to manually debug and fix the missing binary issue?
Logs & Diagnostics:
bash
Copy code
$ snap --version
snap 2.65.3+24.04
snapd 2.65.3+24.04
series 16
bash
Copy code
$ sudo systemctl status snapd
● snapd.service - Snap Daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2024-10-20 12:18:48 EDT; 4min 41s ago
Thank you for your assistance in resolving this issue. Please let me know if any additional information or logs are required.

Issue Labels:
microk8s, snap, installation-error, bug

@ktsakalozos
Copy link
Member

ktsakalozos commented Nov 6, 2024

Hi @sibman can you reproduce this on your end? It seems like a snap package corruption but even the revision you requested seems fine:

$ sudo snap install microk8s --classic --revision 7232
microk8s (1.30/stable) v1.30.5 from Canonical✓ installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants