由于以下错误,无法安装或卸载软件包:
Preparing to unpack .../maas-common_1%3a3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1_all.deb ...
ERROR: The MAAS Debian packages may not be installed alongside the MAAS Snap!
dpkg: error processing archive /var/cache/apt/archives/maas-common_1%3a3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1_all.deb (--unpack):
new maas-common package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/maas-common_1%3a3.0.0-10029-g.986ea3e45-0ubuntu1~20.04.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
您必须通过以下方式删除提到的 MAAS deb 包
sudo apt-get purge maas-common
sudo dpkg --force-all maas-common
sudo apt-get install -f
然后改用 snap。
答案2
您的错误似乎不言自明。您需要使用$ sudo snap install "package name"
而不是使用 deb 包安装方法。我还找到了一些有关 MAAS 的文档,可能有用。https://maas.io/docs