我尝试使用以下命令(来自 fenicsproject.org 网站)在 Ubuntu 18.04.5 LTS 上安装 FEniCS:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:fenics-packages/fenics
sudo apt-get update
sudo apt-get install fenics
操作完成但出现错误:
Traceback (most recent call last):<br>
File "\<string>", line 2, in \<module><br>
ModuleNotFoundError: No module named 'uaclient'<br>
dpkg: error processing package ubuntu-advantage-tools (--configure):<br>
installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1<br>
Errors were encountered while processing:
ubuntu-advantage-tools<br>
E: Sub-process /usr/bin/dpkg returned an error code (1)
事实上,执行:
dpkg --list | grep ubuntu-advantage-tools
我有:
iF ubuntu-advantage-tools 27.2.2~18.04.1 amd64 management tools for Ubuntu Advantage
看来该软件包没有完全配置。因此我尝试重新安装它:
sudo apt-get install --reinstall ubuntu-advantage-tools
但它完成并出现错误:
E: Internal Error, No filename for ubuntu-advantage-tools:amd64
最后我尝试清除该包并再次安装它:
sudo apt-get purge ubuntu-advantage-tools
但它也没有用:
Traceback (most recent call last):<br>
File "\<string>", line 2, in \<module><br>
ModuleNotFoundError: No module named 'uaclient'<br>
dpkg: error processing package ubuntu-advantage-tools (--remove):<br>
installed ubuntu-advantage-tools package post-installation script subprocess returned error exit status 1<br>
Errors were encountered while processing:<br>
ubuntu-advantage-tools<br>
E: Sub-process /usr/bin/dpkg returned an error code (1)
出现这种行为的原因是什么?我应该怎么做才能使其正常工作?