我对 Ubuntu 还很陌生,我搞乱了一些东西,无法使用 apt-get install 安装任何软件包。
最初我收到此错误:
The following packages have unmet dependencies:
linux-image-server : Depends: linux-image-3.2.0-36-generic but it is not going to be installed
linux-server : Depends: linux-headers-server (= 3.2.0.36.43) but 3.2.0.37.45 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
当我尝试运行“sudo apt-get -f install”时,我得到了这个:
dpkg: dependency problems prevent configuration of linux-image-server:
linux-image-server depends on linux-image-3.2.0-36-generic; however:
Package linux-image-3.2.0-36-generic is not installed.
dpkg: error processing linux-image-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 3.2.0.36.43); however:
Package linux-image-server is not configured yet.
linux-server depends on linux-headers-server (= 3.2.0.36.43); however:
Version of linux-headers-server on system is 3.2.0.37.45.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
linux-image-server
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
非常感谢任何帮助,因为我不知道下一步该怎么做。
答案1
我修复此问题的方法是手动安装较新版本的软件包,linux-server
如下所示:
wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-server_3.2.0.37.45_amd64.deb
sudo dpkg -i linux-server_3.2.0.37.45_amd64.deb
如果你运行的是 32 位系统,则需要稍微不同的 URL 和包名称,以便你能够找到这里。
感谢@Eliah Kagan 的回答https://askubuntu.com/a/253581/79271并帮助解答问题元问题。