I am running Ubuntu 18.04 LTS and am trying to install microk8s using snap. When I type the command ‘sudo snap install microk8s --classic’ I get this error message
-----------------------------------------------------------------------------------------------------------------------
error: cannot perform the following tasks:
- Run install hook of "microk8s" snap if present (run hook "install":
-----
+ export LD_LIBRARY_PATH=/snap/microk8s/826/lib:/snap/microk8s/826/usr/lib:/snap/microk8s/826/lib/x86_64-linux-gnu:/snap/microk8s/826/usr/lib/x86_64-linux-gnu
+ LD_LIBRARY_PATH=/snap/microk8s/826/lib:/snap/microk8s/826/usr/lib:/snap/microk8s/826/lib/x86_64-linux-gnu:/snap/microk8s/826/usr/lib/x86_64-linux-gnu
+ export PATH=/snap/microk8s/826/usr/sbin:/snap/microk8s/826/usr/bin:/snap/microk8s/826/sbin:/snap/microk8s/826/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin:/usr/local/bin
+ PATH=/snap/microk8s/826/usr/sbin:/snap/microk8s/826/usr/bin:/snap/microk8s/826/sbin:/snap/microk8s/826/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin:/usr/local/bin
+ source /snap/microk8s/826/actions/common/utils.sh
+ cp -r /snap/microk8s/826/default-args /var/snap/microk8s/826/args
/snap/microk8s/826/meta/hooks/install: line 10: /snap/microk8s/826/bin/cp: No such file or directory
Does anyone know how I would go about fixing it? I have been talking to the developers of Microk8s and they said that this may be a snap configuration issue so I wanted to ask here.
Snap version is 2.39.2+18.04 and this is a genuine local 18.04 LTS install as I downloaded it and installed it myself. Although the physical server is a 3rd party server as it has similar hardware as Nvidia but wasn’t purchased from Nvidia.
Can you snap list and if core18 is listed, and core is not then can you please snap install core then re-install the microk8s snap? snap remove microk8s then snap install microk8s --classic please.
Edit: Actually that’s unlikely to be it. I expect you do have core, right?
Oh okay, well then I only have core version 16-2.41 version as the only installed item in snap list. And when I try to run install microk8s --classic again it failed.
i can absolutely not repoduce this over here, nether on 18.04 nor on 16.04 … and as konstantinos said in the github issue, it doesnt really make any sense to fail like this (yet it does !!), the source dir exists inside the snap (in /snap/microk8s/826/) and the target dir is created before the install hook runs …
do you have any exotic filesystem setup by chance ?
No the only additional file system I have is /dev/md0 which I added. The issue I have is that /snap/microk8s directory does not exist and I don’t know why that is the case.
if an install hook fails, the whole snap gets removed again so you wont find that dir after the failure … you can log in via a second terminal and run something like watch -d ls -l /snap and you should see the dir being created (and removed again) during the install attempt (the same should be true for watching /var/snap).