无法通过 apt-get 安装 Ubuntu 14.04 LTS 中的软件包

无法通过 apt-get 安装 Ubuntu 14.04 LTS 中的软件包

因此,我一直在尝试安装freeglut3-devUbuntu 14.04 LTS,但是每当我输入终端命令时,都会出现以下错误(每当我尝试安装其他软件包时也会发生同样的情况)-

rohitrango@rohitrango-G551JX:~$ sudo apt-get install freeglut3-dev
Reading package lists... Done
Building dependency tree 
Reading state information... Done
freeglut3-dev is already the newest version.
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-34 linux-headers-4.4.0-34-generic
linux-image-4.4.0-34-generic linux-image-extra-4.4.0-34-generic
linux-signed-image-4.4.0-34-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up click (0.4.21.1ubuntu0.2) ...
Traceback (most recent call last):
File "/usr/bin/click", line 31, in <module>
from click import commands
ImportError: cannot import name 'commands'
dpkg: error processing package click (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of click-apparmor:
click-apparmor depends on click; however:
Package click is not configured yet.
dpkg: error processing package click-apparmor (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of upstart-app-launch:
upstart-app-launch depends on click-apparmor; however:
Package click-apparmor is not configured yet.
dpkg: error processing package upstart-app-launch (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of upstart-app-launch-tools:
upstart-app-launch-tools depends on upstart-app-launch (= 0.3+14.04.20140411-0ubuntu1); however:
Package upstart-app-launch is not configured yet.
dpkg: error processing package upstart-app-launch-tools (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
click
click-apparmor
upstart-app-launch
upstart-app-launch-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
rohitrango@rohitrango-G551JX:~$ 

所以我尝试sl从系统中删除该软件包,看看是否收到相同的错误。我确实这样做了,但在这里,该软件包确实被删除了。我不是专家,所以我不知道发生了什么。

非常感谢您的帮助!谢谢!

答案1

上面的日志显示:“freeglut3-dev 已经是最新版本。”所以你的系统中有这个应用程序,它还说有未使用的包,可以删除。我建议你先更新系统

sudo apt update

然后安装更新

sudo apt upgrade

安装系统更新

sudo apt dist-upgrade

安装错过的依赖项

sudo apt install -f

然后清理不需要的包

sudo apt-get autoremove
sudo apt-get autoclean

现在尝试安装一些东西。

相关内容