<p>When attempting to install the snap microk8s 1.19/stable on a Linux machine we got any of the following errors:</p>
<pre><code>error: cannot perform the following tasks:
- Run configure hook of &quot;microk8s&quot; snap if present (run hook &quot;configure&quot;:
</code></pre>
<p>or</p>
<pre><code> - Mount snap &quot;microk8s&quot; (1769) ([stop snap-microk8s-1769.mount] failed with exit status -1: *** stack smashing detected ***: terminated
</code></pre>
<p>or</p>
<pre><code>+ /snap/microk8s/1769/kubectl --kubeconfig=/var/snap/microk8s/1769/credentials/client.config apply -f /var/snap/microk8s/1769/args/cni-network/cni.yaml
The connection to the server 127.0.0.1:16443 was refused - did you specify the right host or port?
</code></pre>
<p>or</p>
<pre><code>- Fetch and check assertions for snap &quot;microk8s&quot; (1769) (cannot verify snap &quot;microk8s&quot;, no matching signatures found)
</code></pre>
<p>We had microk8s previously installed but had removed it some time ago, just mentioning it in case this could help. I doubt it is something to do with previous remnants, we also did temporarily disable the firewall just to be sure it is not a firewall issue.</p>
<p><strong>EDIT</strong>: this is now a long-gone issue and I forgot to post an update since it happened. The core issue seemed to have happened because the OS had a broken third-party software/application - totally unrelated - that was generating a colossal amount of logs and we were temporarily running out of space - between the logs were sorted out - where there was also a task cleaning the logs. If anyone gets such an issue, you might consider also checking if you have stable enough space for the installation to succeed during the installation. The upgrade route in the accepted answer was quick enough to apply before we randomly ran out of space. Once we fixed the unrelated issue with the other software/application - it was possible to install microk8s 1.19/stable directly without going through the upgrade route.</p>

dankilev
<p>Seems like it might be an issue with the latest branch (v1.19) or in some way related to your OS. I have deployed this on ubuntu (20.04) and v1.19 worked fine for me.</p>
<p>Installing version 1.18 with stable snap channel solved issue:</p>
<pre><code>sudo snap install microk8s --classic --channel=1.18/stable
</code></pre>
<p>You may also want to try to update the microk8s:</p>
<pre><code>sudo snap refresh microk8s --classic --channel=1.19/stable
</code></pre>
<p><a href="https://microk8s.io/docs/setting-snap-channel" rel="noreferrer">Here</a>`s more information how to check/use microk8s channels.</p>
