apt-get remove 包名称报如下错误

E: Sub-process /usr/bin/dpkg returned an error code (1)

参考文档如下:

http://www.linuxforums.org/forum/debian-linux-help/133537-subprocess-usr-bin-dpkg-returned-error-code-1-a.html

解决方案:

1. Open terminal, type(打开终端,进入如下目录)

cd /var/lib/dpkg/info

2. Remove the info files for the bad packages (WARNING, this is dangerous in some cases): Type

删除该目录下含有该软件包名称的文件
sudo rm -f <badPackageNameThatWasn'tInstalledInYourCase>*

3.重新APT-GET

sudo apt-get update -f

and

sudo apt-get upgrade,
最后apt install 即可

sudo apt-get install <packageThatCouldn'tBeInstalledPreviously>

网上也有流转修改info的方案,这种方法试过了还是不行

此时可以这样解决:
cd /var/lib/dpkg
sudo mv info info.bak
sudo mkdir info