安装 git 和 nodejs 时出现问题

安装 git 和 nodejs 时出现问题

我正在尝试安装 nodejs 和 git。

我使用了这个命令:

sudo apt install git

但我收到以下错误。您能告诉我哪里出了问题吗?

Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.7.4-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
21 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Setting up python-cairo (1.8.8-2) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-cairo (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-gobject-2 (2.28.6-12ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-gobject-2 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-gtk2:
 python-gtk2 depends on python-cairo (>= 1.0.2-1.1); however:
  Package python-cairo is not configured yet.
 python-gtk2 depends on python-gobject-2 (>= 2.21.3); however:
  Package python-gobject-2 is not configured yet.

dpkg: error processing package python-gtk2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up python-gi (3.20.0-0ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-gi (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python-gobject:
 python-gobject depends on python-gi (>= 3.20.0-0ubuntu1); however:
  Package python-gi is not configured yet.
 python-gobject depends on python-gobject-2; however:
  Package python-gobject-2 is not configured yet.

dpkg: error processing package python-gobject (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python-gtksourceview2:
 python-gtksourceview2 depends on python-gobject (>= 2.15.2); however:
  Package python-gobject is not configured yet.
 python-gtksourceview2 depends on python-gtk2 (>= 2.8.0); however:
  Package python-gtk2 is not configured yet.

dpkg: error processing package python-gtksourceview2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of python-glade2:
 python-glade2 depends on python-gtk2 (= 2.24.0-4ubuntu1); however:
  Package python-gtk2 is not configured yet.

dpkg: error processing package python-glade2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of dreampie:
 dreampie depends on python-gtk2; however:
  Package python-gtk2 is not configured yet.
 dreampie depends on python-gtksourceview2; however:
  Package python-gtksourceview2 is not configured yet.
 dreampie depends on python-glade2; however:
  Package python-glade2 is not configured yet.

dpkg: error processing package dreampie (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up python-mysql.connector (2.0.4-1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-mysql.connector (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-utilities:
 mysql-utilities depends on python-mysql.connector (>= 1.2.1); however:
  Package python-mysql.connector is not configured yet.

dpkg: error processing package mysql-utilities (--configure):
 dependency problems - leaving unconfigured
Setting up python-crypto (2.6.1-6build1) ...
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-crypto (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-six (1.10.0-3) ...
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-six (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-ecdsa:
 python-ecdsa depends on python-six (>= 1.2); however:
  Package python-six is not configured yet.

dpkg: error processing package python-ecdsa (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-paramiko:
 python-paramiko depends on python-crypto (>= 2.1.0-2); however:
  Package python-crypto is not configured yet.
 python-paramiko depends on python-ecdsa; however:
  Package python-ecdsa is not configured yet.

dpkg: error processing package python-paramiko (--configure):
 dependency problems - leaving unconfigured
Setting up python-ptyprocess (0.5-1) ...
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-ptyprocess (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python-pexpect:
 python-pexpect depends on python-ptyprocess; however:
  Package python-ptyprocess is not configured yet.

dpkg: error processing package python-pexpect (--configure):
 dependency problems - leaving unconfigured
Setting up python-pysqlite2 (2.7.0-1) ...
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-pysqlite2 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-workbench:
 mysql-workbench depends on python-mysql.connector; however:
  Package python-mysql.connector is not configured yet.
 mysql-workbench depends on python-paramiko; however:
  Package python-paramiko is not configured yet.
 mysql-workbench depends on python-pexpect; however:
  Package python-pexpect is not configured yet.
 mysql-workbench depends on python-pysqlite2; however:
  Package python-pysqlite2 is not configured yet.

dpkg: error processing package mysql-workbench (--configure):
 dependency problems - leaving unconfigured
Setting up pychecker (0.8.19-11) ...
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package pychecker (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-wxversion (3.0.2.0+dfsg-1build1) ...
No apport report written because MaxReports is reached already
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wxversion (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Setting up winpdb (1.4.8-2.1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package winpdb (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 python-cairo
 python-gobject-2
 python-gtk2
 python-gi
 python-gobject
 python-gtksourceview2
 python-glade2
 dreampie
 python-mysql.connector
 mysql-utilities
 python-crypto
 python-six
 python-ecdsa
 python-paramiko
 python-ptyprocess
 python-pexpect
 python-pysqlite2
 mysql-workbench
 pychecker
 python-wxversion
 winpdb

更新:我第一次和第二次运行 apt 命令时都遇到了这些错误。看起来是第一次安装 git 时发生的。我只是不知道这些错误是什么。

更新2

解决方案解决了我的问题

相关内容