今天早上启动 Ubuntu 时遇到了问题(但在启动过程中选择“尝试修复”后,它终于启动了)。不幸的是,升级过程中出现了更多问题:
sudo apt-get dist-upgrade [sudo] password for majkel: Reading package
lists... Done Building dependency tree Reading state
information... Done Calculating upgrade... Done The following packages
will be upgraded: bsdutils ca-certificates compiz compiz-core
compiz-gnome compiz-plugins-default e2fslibs e2fsprogs libblkid1
libcomerr2 libcomerr2:i386 libcompizconfig0 libdecoration0 libmount1
libsmbclient libss2 libunity-core-6.0-9 libuuid1 libuuid1:i386
libwbclient0 mount python-compizconfig python-samba samba-common
samba-common-bin samba-libs smbclient sysdig ubuntu-docs unity
unity-services util-linux uuid-runtime 33 upgraded, 0 newly installed,
0 to remove and 0 not upgraded. Need to get 0 B/13,2 MB of archives.
After this operation, 951 kB of additional disk space will be used. Do
you want to continue? [Y/n] Extracting templates from packages: 100%
Preconfiguring packages ... dpkg: warning: files list file for package
'libvisual-0.4-plugins:amd64' missing; assuming package has no files
currently installed dpkg: warning: files list file for package
'libvisio-0.0-0' missing; assuming package has no files currently
installed dpkg: warning: files list file for package
'libpcrecpp0:amd64' missing; assuming package has no files currently
installed dpkg: warning: files list file for package
'libvorbis0a:amd64' missing; assuming package has no files currently
installed dpkg: warning: files list file for package
'libupstart1:amd64' missing; assuming package has no files currently
installed dpkg: warning: files list file for package 'libunity-misc4'
missing; assuming package has no files currently installed dpkg:
warning: files list file for package 'libvisual-0.4-0:amd64' missing;
assuming package has no files currently installed dpkg: warning: files
list file for package 'libv4lconvert0:amd64' missing; assuming package
has no files currently installed dpkg: warning: files list file for
package 'libglib2.0-bin' missing; assuming package has no files
currently installed dpkg: warning: files list file for package
'libunity-webapps0' missing; assuming package has no files currently
installed dpkg: warning: files list file for package
'libunity-protocol-private0:amd64' missing; assuming package has no
files currently installed dpkg: warning: files list file for package
'libnss3-1d:amd64' missing; assuming package has no files currently
installed dpkg: warning: files list file for package
'libupower-glib1:amd64' missing; assuming package has no files
currently installed dpkg: warning: files list file for package
'libvorbisenc2:amd64' missing; assuming package has no files currently
installed dpkg: warning: files list file for package
'liburl-dispatcher1:amd64' missing; assuming package has no files
currently installed dpkg: warning: files list file for package
'libuuid-perl' missing; assuming package has no files currently
installed dpkg: warning: files list file for package 'libunity9:amd64'
missing; assuming package has no files currently installed dpkg:
warning: files list file for package 'liburi-perl' missing; assuming
package has no files currently installed dpkg: warning: files list
file for package 'libusb-1.0-0:amd64' missing; assuming package has no
files currently installed dpkg: warning: files list file for package
'libunity-action-qt1:amd64' missing; assuming package has no files
currently installed dpkg: warning: files list file for package
'libunistring0:amd64' missing; assuming package has no files currently
installed dpkg: warning: files list file for package 'libusbmuxd2'
missing; assuming package has no files currently installed dpkg:
warning: files list file for package 'libutempter0' missing; assuming
package has no files currently installed dpkg: unrecoverable fatal
error, aborting: unable to open files list file for package
`libunity-scopes-json-def-desktop': No such device E: Sub-process
/usr/bin/dpkg returned an error code (2)
我甚至尝试过:
sudo apt-get install libunity-scopes-json-def-desktop Reading package
lists... Done Building dependency tree Reading state
information... Done libunity-scopes-json-def-desktop is already the
newest version. 0 upgraded, 0 newly installed, 0 to remove and 33 not
upgraded.
(不幸的是,使用--reinstall 也不起作用)我该如何正确更新我的 Ubuntu?
答案1
正确的解决方案描述如下: https://urbanjack.wordpress.com/2013/08/14/fix-unable-to-open-files-list-file-for-package-inputoutput-error/
- cd /var/lib/dpkg
- cp 状态 stauts.备份
- sudo nano 状态
- ctrl + w 进行搜索,输入包名称,例如“python2.6-minimal”
- 删除完整的包块(使用 ctrl-k 可以删除整行)示例(删除上下文)
软件包:<*****> 状态:清除 ok 安装 优先级:可选 部分:kde 安装大小:1234 维护者:Bla Bla 架构:全部 来源:oxygen-icons 版本:1:2.3.5-0rasp1~berry1 建议:kdebase (>= 1:2.3.4-1) 描述:Bla la bla 主页:http://www.kde.org/ 原始维护者:Peter Püppel
- 保存:ctrl + o ...输入...ctrl + x ...退出
- sudo dpkg –configure -a
- sudo apt-get -f install 然后
- sudo apt-get 更新
- sudo apt-get 升级