由于未满足的依赖关系而无法安装 Meson,似乎无法修复?

由于未满足的依赖关系而无法安装 Meson,似乎无法修复?

我最近从 Ubuntu 切换到 Debian 10。我正在尝试安装 Meson,但出现了一些错误。我究竟做错了什么?

克隆介子后,python3 setup.py install出现以下错误:

Traceback (most recent call last):
  File "setup.py", line 24, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'

安装设置工具:

sudo apt-get install python3-setuptools
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:
 python3-setuptools : Depends: python3-pkg-resources (= 33.1.1-1) but 40.8.0-1 is to be installed
E: Unable to correct problems, you have held broken packages.

尝试修复丢失的包

sudo apt-get update --fix-missing
Ign:1 http://ftp.debian.org/debian stretch InRelease
Hit:2 http://ftp.debian.org/debian stretch Release

尝试安装 python3-pkg-resources

$ sudo apt install python3-pkg-resources
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-pkg-resources is already the newest version (40.8.0-1).
python3-pkg-resources set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

此时我完全没有头绪。很明显我不明白一些重要的事情。任何帮助将不胜感激。

-- 编辑:尝试后pip3 install meson我收到了回溯错误。

$ pip3 install meson
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 26, in <module>
    from pip.utils import get_installed_distributions, get_prog
  File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 23, in <module>
    from pip.locations import (
  File "/usr/lib/python3/dist-packages/pip/locations.py", line 9, in <module>
    from distutils import sysconfig
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.7/distutils/__init__.py)

答案1

如果你有 pip3:pip3 install meson会处理一切

答案2

已修复问题。更新了sources.list,由于某种原因正在使用debian 9 存储库。不知道这是怎么发生的。

相关内容