学无先后,达者为师

网站首页 编程语言 正文

Centos error: cannot remove “core“: snap “core“ is not removable: snap is used by the model

作者:从零开始的数据猿 更新时间: 2022-05-13 编程语言

当我在Centos7.6使用snap remove core时报错,
error: cannot remove "core": snap "core" is not removable: snap is used by the model
解决办法

(1) use 'df' to find the mount point of "/snap/core/*"
(2) stop the snap service
(3) umount /snap/core/xxxx
(4) start snap service
(5) use snap remove core - which then worked

Here’s the abbreviated output

$ snap list
Name Version Rev Developer Notes
core 16-2.26.14 2462 canonical -

$ df # use output to find the mount point "/snap/core/xxxx"

$ sudo umount /snap/core/2462 # this failed on my system, unlike poster above
umount: /snap/core/2462: target is busy
...

$ sudo systemctl stop snapd
Warning: Stopping snapd.service, but it can still be activated by: snapd.socket

$ sudo umount /snap/core/2462 # umount worked with snapd stopped

$ sudo systemctl start snapd # start snapd again in order to use 'snap remove' command

$ df # verify that starting the snap service didn't remount "core" (it didn't)
...
{"/snap/core/xxxx" not listed}
...

$ sudo snap remove core # success!
core removed

---
Verify Removal:

$ sudo snap list
No snaps are installed yet. Try "snap install hello-world"

$ ls -l /snap/core
...
{nothing listed}

来源:https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1589210

原文链接:https://nmydt.blog.csdn.net/article/details/124323495

栏目分类
最近更新