apt-get install python-dev 无法满足依赖关系

apt-get install python-dev 无法满足依赖关系

我无法在我的服务器上安装 python-dev。CPU - ARM64 OS - Ubuntu16.04.03

由于未满足依赖关系,它失败了。

我已经尝试过更新、升级、强制安装,并按照多个链接进行解决。看起来是 ubuntu16.04.3 中 ARM64 特有的问题...

# sudo apt policy python-dev
python-dev:
  Installed: (none)
  Candidate: 2.7.11-1
  Version table:
     2.7.11-1 500
        500 http://us.ports.ubuntu.com/ubuntu-ports xenial/main arm64 Packages

我尝试手动安装依赖的 python pkg,但无法解决依赖关系:

root@ubuntu:/home# sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python-dev : Depends: libpython-dev (= 2.7.11-1) but it is not going to be installed
              Depends: python2.7-dev (>= 2.7.11-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root@ubuntu:/home# sudo apt-get install python2.7-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python2.7-dev : Depends: libpython2.7-dev (= 2.7.12-1ubuntu0~16.04.2) but it is not going to be installed
                 Depends: libpython2.7 (= 2.7.12-1ubuntu0~16.04.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root@ubuntu:/home# sudo apt-get install libpython2.7 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.12-1ubuntu0~16.04.1) but 2.7.12-1ubuntu0~16.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.

root@ubuntu:/home# sudo apt-get install libpython2.7-stdlib 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libpython2.7-stdlib is already the newest version (2.7.12-1ubuntu0~16.04.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@ubuntu:/home# sudo apt-get install libpython2.7 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libpython2.7 : Depends: libpython2.7-stdlib (= 2.7.12-1ubuntu0~16.04.1) but 2.7.12-1ubuntu0~16.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.

如果需要分享更多信息,请告诉我。

谢谢

答案1

尝试运行

 sudo apt-get install -f

我遇到了类似的问题,其他一些软件包也成功了。我希望你已经运行过这个命令。

相关内容