sudo apt-get install vlc
Reading package lists... Error!
E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory)
E: Could not open file - open (2: No such file or directory)
E: Problem opening
E: The package lists or status file could not be parsed or opened.
Run Code Online (Sandbox Code Playgroud)
每当我尝试安装任何软件时,都会出现此错误。我该如何解决这个问题?
小智 9
我最近在使用 ubuntu 16.04.3 LTS 时遇到了类似的问题,对我有用的方法如下 -
首先,您需要创建一个空文件,如下所示:-
adminuser@sandbox:~$ sudo touch /var/lib/dpkg/status
Run Code Online (Sandbox Code Playgroud)
现在运行更新和升级:-
adminuser@sandbox:~$ sudo apt update && sudo apt upgrade
Run Code Online (Sandbox Code Playgroud)
很可能你最终会看到这样的东西——
adminuser@sandbox:~$ sudo apt update
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
adminuser@sandbox:~$ apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Run Code Online (Sandbox Code Playgroud)
但是,如果您注销并重新登录,您的 MOTD 会显示一些更新正在等待中 -
Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-96-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
108 packages can be updated.
27 updates are security updates.
Run Code Online (Sandbox Code Playgroud)
此时,你需要运行 dist-upgrade -
adminuser@sandbox:~$ sudo apt dist-upgrade
Run Code Online (Sandbox Code Playgroud)
这应该可以解决问题,但请确保它不会促使您将 Ubuntu 实际升级到新版本。据我所知,在 Ubuntu 18.04 LTS 发布之前,这应该可以工作。祝你好运
归档时间: |
|
查看次数: |
37134 次 |
最近记录: |