无法安装 python-apt

无法安装 python-apt

当我使用 pip 时会发生这种情况:

user1@ubuntu-ipc:~$ pip install python-apt
Collecting python-apt
  Using cached https://files.pythonhosted.org/packages/e5/ff/63bb64a103eda6f13364381e983c0121eeacc337a4421d6005ff7dd76741/python-apt-0.7.8.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-OEhz4q/python-apt/setup.py", line 6, in <module>
        from DistUtilsExtra.command import *
    ImportError: No module named DistUtilsExtra.command

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-OEhz4q/python-apt/

当我使用 apt 时会发生这种情况:

user1@ubuntu-ipc:~$ sudo apt-get install python-apt
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-apt : Depends: libapt-inst2.0 (>= 1.6.5~) but it is not going to be installed
              Depends: libapt-pkg5.0 (>= 1.6.5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

libapt-inst2.0取决于libapt-pkg5.0,而这取决于base-filesbase-passwdbashdebianutilsdiffutilse2fsprogshostname,,libapt-pkg5.0它们都安装在它们的最新版本上。libc-binncurses-bin

user1@ubuntu-ipc:~$ sudo apt-get -f install

结果是

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

关于如何进行有什么建议吗?

答案1

安装aptitude并尝试使用它进行安装:

aptitude install python-apt

这将为你提供更多解决冲突的选择

相关内容