我正在尝试运行以下命令,但出现错误。我该如何解决?
nas@nas:/boot$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
linux-generic : Depends: linux-headers-generic (= 3.2.0.107.123) but 3.2.0.120.135 is installed
linux-image-generic : Depends: linux-image-3.2.0-107-generic but it is not installed
E: Unmet dependencies. Try using -f.
nas@nas:/boot$
我尝试运行 apt-get -f install 但仍然出现错误
nas@nas:/boot$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
linux-generic linux-image-generic
The following packages will be upgraded:
linux-generic linux-image-generic
2 upgraded, 0 newly installed, 0 to remove and 73 not upgraded.
2 not fully installed or removed.
Need to get 0 B/4,160 B of archives.
After this operation, 2,048 B of additional disk space will be used.
Do you want to continue [Y/n]?
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-3.2.0-107-generic; however:
Package linux-image-3.2.0-107-generic is not installed.
dpkg: error processing linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 3.2.0.107.123); however:
Package linux-image-generic is not configured yet.
linux-generic depends on linux-headers-generic (= 3.2.0.107.123); however:
Version of linux-headers-generic on system is 3.2.0.120.135.
dpkg: error processing linux-generic (--configure):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.
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-generic
linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
nas@nas:/boot$
任何帮助,将不胜感激。
答案1
看起来以下内容解决了我的问题
sudo dpkg -i /var/cache/apt/archives/*.deb
sudo dpkg --configure -a