Не способный установить python-dev из-за зависимостей от Ubuntu 16.04

Как может я разрешать эту проблему (не повреждая мой компьютер!)? Я хочу установить python-dev на моей Ubuntu. Я уже попробовал aptitude, это не было полезно.

$ sudo apt-get install libexpat1-dev libpython-dev libpython2.7-dev 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:
 libexpat1-dev : Depends: libexpat1 (= 2.1.0-7) but 2.1.0-7ubuntu0.16.04.2 is to be installed
 libpython2.7-dev : Depends: libpython2.7-stdlib (= 2.7.11-7ubuntu1) but 2.7.12-1ubuntu0~16.04.1 is to be installed
                    Depends: libpython2.7 (= 2.7.11-7ubuntu1) but 2.7.12-1ubuntu0~16.04.1 is to be installed
 python-dev : 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.

Дополнительный:

$ apt policy libexpat1-dev
libexpat1-dev:
  Installed: (none)
  Candidate: 2.1.0-7
  Version table:
     2.1.0-7 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
$ grep "^deb " /etc/apt/sources.li
st
deb http://archive.ubuntu.com/ubuntu xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial universe
deb http://archive.ubuntu.com/ubuntu xenial multiverse
deb http://archive.canonical.com/ubuntu xenial partner
$ apt policy python2.7-dev
python2.7-dev:
  Installed: (none)
  Candidate: 2.7.11-7ubuntu1
  Version table:
     2.7.11-7ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
2
задан 5 June 2017 в 14:53

1 ответ

Кажется, у вас нет важного хранилища в вашем sources.list включенном.

Добавьте эту строку:

deb http://archive.ubuntu.com/ubuntu/ xenial-updates main universe multiverse

к /etc/apt/sources.list, затем используйте sudo apt update.

это должно сработать.

6
ответ дан 2 December 2019 в 01:43

Другие вопросы по тегам:

Похожие вопросы: