无法下载 python-dev

无法下载 python-dev

我正在考虑下载 python-dev (我需要它来编译其他东西),但显然我无法使用 apt-get 下载/安装它。

$ sudo apt-get -f install python-dev

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:
 libc6 : Depends: libc-bin (= 2.11.3-4+deb6u6) but 2.11.3-4+deb6u8 is to be installed
 libc6-dev : Depends: libc6 (= 2.11.3-4+deb6u8) but 2.11.3-4+deb6u6 is to be installed
 libc6-i386 : Depends: libc6 (= 2.11.3-4+deb6u8) but 2.11.3-4+deb6u6 is to be installed
 python-dev : Depends: python2.6-dev (>= 2.6.6-1~) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

我尝试安装 python2.6-dev,但再次表示我需要其他依赖项(libssl-dev)。有办法解决这个问题吗?

在没有软件包的情况下运行“apt-get -f install”会起作用吗? (我已经尝试过,但随后它说以下内容):

WARNING: The following packages cannot be authenticated!
  libc6-i386 libc6-dev libc-dev-bin libc-bin libc6
Install these packages without verification [y/N]? N

现在......如果我尝试使用“sudo apt-get update ; sudo apt-get update”更新/升级所有内容,我最终会得到以下结果:

#(...)
E: Some index files failed to download, they have been ignored, or old ones used instead.
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:
 libc6 : Depends: libc-bin (= 2.11.3-4+deb6u6) but 2.11.3-4+deb6u8 is installed
 libc6-dev : Depends: libc6 (= 2.11.3-4+deb6u8) but 2.11.3-4+deb6u6 is installed
 libc6-i386 : Depends: libc6 (= 2.11.3-4+deb6u8) but 2.11.3-4+deb6u6 is installed
E: Unmet dependencies. Try using -f.

有什么建议么?

看起来我总是遇到一些版本/不匹配的问题,我不知道如何处理......


欲了解信息:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 6.0.10 (squeeze)
Release:    6.0.10
Codename:   squeeze

$ apt-cache policy libc6-i386 libc6-dev libc-dev-bin libc-bin libc6 python python-dev python2.6-dev 
libc6:
  Installed: 2.11.3-4+deb6u6
  Candidate: 2.11.3-4+deb6u11
  Version table:
     2.11.3-4+deb6u11 0
        500 http://http.debian.net/debian/ squeeze-lts/main amd64 Packages
 *** 2.11.3-4+deb6u6 0
        100 /var/lib/dpkg/status
     2.11.3-4 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
python:
  Installed: 2.6.6-3+squeeze7
  Candidate: 2.6.6-3+squeeze7
  Version table:
 *** 2.6.6-3+squeeze7 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
        100 /var/lib/dpkg/status
libc6-dev:
  Installed: 2.11.3-4+deb6u8
  Candidate: 2.11.3-4+deb6u11
  Version table:
     2.11.3-4+deb6u11 0
        500 http://http.debian.net/debian/ squeeze-lts/main amd64 Packages
 *** 2.11.3-4+deb6u8 0
        100 /var/lib/dpkg/status
     2.11.3-4 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
libc6-i386:
  Installed: 2.11.3-4+deb6u8
  Candidate: 2.11.3-4+deb6u11
  Version table:
     2.11.3-4+deb6u11 0
        500 http://http.debian.net/debian/ squeeze-lts/main amd64 Packages
 *** 2.11.3-4+deb6u8 0
        100 /var/lib/dpkg/status
     2.11.3-4 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
python-dev:
  Installed: (none)
  Candidate: 2.6.6-3+squeeze7
  Version table:
     2.6.6-3+squeeze7 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
libc-bin:
  Installed: 2.11.3-4+deb6u8
  Candidate: 2.11.3-4+deb6u11
  Version table:
     2.11.3-4+deb6u11 0
        500 http://http.debian.net/debian/ squeeze-lts/main amd64 Packages
 *** 2.11.3-4+deb6u8 0
        100 /var/lib/dpkg/status
     2.11.3-4 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
libc-dev-bin:
  Installed: 2.11.3-4+deb6u8
  Candidate: 2.11.3-4+deb6u11
  Version table:
     2.11.3-4+deb6u11 0
        500 http://http.debian.net/debian/ squeeze-lts/main amd64 Packages
 *** 2.11.3-4+deb6u8 0
        100 /var/lib/dpkg/status
     2.11.3-4 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages
python2.6-dev:
  Installed: (none)
  Candidate: 2.6.6-8+deb6u3
  Version table:
     2.6.6-8+deb6u3 0
        500 http://http.debian.net/debian/ squeeze-lts/main amd64 Packages
     2.6.6-8+b1 0
        500 http://ftp.uk.debian.org/debian/ squeeze/main amd64 Packages

答案1

您正在使用 Squeeze,它已达到其生命周期(自2016年2月实际上)。存储库已移至 archive.debian.org,因此您需要将所有出现的“http.debian.net”和“ftp.uk.debian.org”替换为/etc/apt/sources.list“archive.debian.org”,然后运行

apt-get update

再次。然后apt-get upgrade应该找到它需要的文件。

我强烈建议您升级到受支持的版本...

相关内容