E:需要重新安装软件包 linux-image-3.5.0-49-generic,但我找不到它的存档

E:需要重新安装软件包 linux-image-3.5.0-49-generic,但我找不到它的存档

我不是一个使用命令行的人,但是我知道有时我需要使用它......

我完全不知所措,我尝试按照一些说明修复上述标题。这似乎在某种程度上起了作用,但现在情况更糟了,有几个包坏了。我尝试升级,似乎安装了很多,但当我运行

eddie@freewill:~$ sudo apt-get check
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:
 libc-dev-bin : Depends: libc6 (> 2.17) but 2.15-0ubuntu20.2 is installed
 libc6-dev : Depends: libc6 (= 2.17-93ubuntu4) but 2.15-0ubuntu20.2 is installed
E: Unmet dependencies. Try using -f.
eddie@freewill:~$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
eddie@freewill:~$ 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:
  exo-utils libexo-1-0 libexo-common libexo-helpers libgarcon-1-0
  libgarcon-common libkeybinder0 libthunarx-2-0 libtumbler-1-0
  linux-headers-3.5.0-17 thunar-data tumbler tumbler-common xfce4-settings
  xfce4-volumed xfdesktop4 xfdesktop4-data
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libc6 linux-image-3.11.0-20-generic linux-image-3.5.0-49-generic
Suggested packages:
  glibc-doc fdutils linux-doc-3.11.0 linux-source-3.11.0 linux-tools
  linux-headers-3.11.0-20-generic linux-lts-quantal-doc-3.5.0
  linux-lts-quantal-source-3.5.0 linux-lts-quantal-tools
  linux-headers-3.5.0-49-generic
The following packages will be upgraded:
  libc6 linux-image-3.11.0-20-generic linux-image-3.5.0-49-generic
3 upgraded, 0 newly installed, 0 to remove and 1397 not upgraded.
25 not fully installed or removed.
Need to get 59.9 MB of archives.
After this operation, 198 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ saucy/main libc6 amd64 2.17-93ubuntu4            [4,730 kB]
Get:2 http://security.ubuntu.com/ubuntu/ precise-security/main linux-image-3.5.0-49-    generic amd64 3.5.0-49.74~precise1 [40.7 MB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ saucy-updates/main linux-image-3.11.0-20-    generic amd64 3.11.0-20.35 [14.5 MB]
Fetched 59.9 MB in 54s (1,091 kB/s)                                            
debconf: Perl may be unconfigured (Can't locate warnings/register.pm in @INC (@INC     contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2     /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14     /usr/local/lib/site_perl .) at /usr/share/perl/5.14/vars.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl/5.14/vars.pm line 7.
Compilation failed in require at /usr/lib/perl/5.14/File/Spec.pm line 4.
BEGIN failed--compilation aborted at /usr/lib/perl/5.14/File/Spec.pm line 4.
Compilation failed in require at /usr/lib/perl/5.14/IO/File.pm line 12.
BEGIN failed--compilation aborted at /usr/lib/perl/5.14/IO/File.pm line 12.
Compilation failed in require at /usr/share/perl/5.14/FileHandle.pm line 9.
Compilation failed in require at (eval 1) line 3.
BEGIN failed--compilation aborted at (eval 1) line 3.
) -- aborting
(Reading database ... 173564 files and directories currently installed.)
Preparing to replace libc6:amd64 2.15-0ubuntu20.2 (using .../libc6_2.17-    93ubuntu4_amd64.deb) ...
Can't locate warnings/register.pm in @INC (@INC contains: /etc/perl     /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5     /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at     /usr/share/perl/5.14/vars.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl/5.14/vars.pm line 7.
Compilation failed in require at /usr/share/perl/5.14/base.pm line 4.
BEGIN failed--compilation aborted at /usr/share/perl/5.14/base.pm line 4.
Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Log.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7.
Compilation failed in require at /usr/share/debconf/frontend line 6.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6.
dpkg: error processing /var/cache/apt/archives/libc6_2.17-93ubuntu4_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              Errors were encountered     while processing:
 /var/cache/apt/archives/libc6_2.17-93ubuntu4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

尝试

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get clean
sudo apt-get update && sudo apt-get upgrade

相关内容