我正在安装一个软件包(Ubuntu 12.04 64 位),并被告知有依赖项未应用于我的安装。根据建议,我运行“sudo apt-get -f install”来修复它们,但在此过程中 /boot 中的空间不足。我释放了 /boot 中的空间,但现在,我无法应用任何东西,因为我陷入了循环:
moodle:/boot$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
php-fpdf linux-headers-3.2.0-44-generic linux-headers-3.2.0-52-generic linux-
headers-3.2.0-44 linux-headers-3.2.0-51 linux-headers-3.2.0-52
unzip libphp-magpierss mimetex smarty php5-curl libphp-snoopy
linux-image-3.2.0-51- generic php5-xmlrpc libjs-yui libphp-pclzip zip
linux-headers-3.2.0-51-generic php5-ldap linux-image-3.2.0-44-generic
linux-image-3.2.0-52-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-server
The following packages will be upgraded:
linux-server
1 upgraded, 0 newly installed, 0 to remove and 112 not upgraded.
1 not fully installed or removed.
Need to get 0 B/1,734 B of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]?
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.54.64); however:
Version of linux-image-server on system is 3.2.0.58.69.
linux-server depends on linux-headers-server (= 3.2.0.54.64); however:
Version of linux-headers-server on system is 3.2.0.58.69.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
有什么建议么?
问候,戈登
答案1
尝试运行 apt-get check,这样 apt 就可以验证你的机器是否正常,以及所有软件包的依赖关系是否都正确满足
如果您的系统没有严重损坏,您可以使用 apt-get -f install 进行修复。如果系统损坏,您必须手动修复这些依赖项(我的意思是使用 dpkg 命令),然后才能开始使用 apt。
或者可能
apt-get build-dep build-essential
能力更新 && 能力完整升级
将修复您的系统,我过去的经验是,每次我使用 apt-get 时遇到困难,安装 build dep 或 build-essential 就能修复我的问题。