尝试在我的 pi 上安装 mono,apt 开始拒绝安装软件包,因为 dpkg 退出了。我得到的输出如下:
Traceback (most recent call last):
File "/usr/bin/apt-listchanges", line 37, in <module>
import apt_listchanges, DebianFiles, ALCApt, ALCConfig, ALCSeenDb
File "/usr/share/apt-listchanges/apt_listchanges.py", line 32, in <module>
import email.message
File "/usr/lib/python3.5/email/message.py", line 16, in <module>
from email import utils
File "/usr/lib/python3.5/email/utils.py", line 40, in <module>
from email.charset import Charset
File "/usr/lib/python3.5/email/charset.py", line 14, in <module>
import email.base64mime
File "/usr/lib/python3.5/email/base64mime.py", line 37, in <module>
from base64 import b64encode
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 669, in exec_module
File "<frozen importlib._bootstrap_external>", line 773, in get_code
File "<frozen importlib._bootstrap_external>", line 484, in _compile_bytecode
ValueError: bad marshal data (invalid reference)
dpkg: unrecoverable fatal error, aborting:
files list file for package 'libhunspell-1.4-0:armhf' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)
我找不到任何修复方法,apt 也因此无法工作,所以apt install -f
什么也没做
答案1
我用了该命令并修复了我的问题apt full-upgrade
:
sudo find /usr -name '*.pyc' -delete