我正在运行 Ubuntu 18.04,每次运行时sudo apt-get upgrade
都会出现此错误:
dpkg-deb: error: tar subprocess returned error exit status 1
dpkg: error processing archive /var/cache/apt/archives/bsdutils_1%3a2.31.1-0.4ubuntu3.4_amd64.deb (--unpack):
dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/bsdutils_1%3a2.31.1-0.4ubuntu3.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
除此之外,当我尝试使用 安装任何.deb
文件时sudo apt install
,我收到此错误:
Reading package lists... Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /home/paras/Downloads/code_1.37.1-1565886362_amd64.deb
E: The package lists or status file could not be parsed or opened.
请帮忙。
答案1
您可以尝试使用以下命令清除 apt 缓存
sudo apt-get clean
更新软件包列表
sudo apt-get update
修复任何不完整的安装
sudo apt-get -f install
sudo dpkg --configure -a
最后
sudo apt-get upgrade
我不确定这是否正是您解决问题所需要的,但您可以尝试一下。