GNU/Linux >> Linux の 問題 >  >> Ubuntu

Ubuntu 15.04 Linux 4.0の更新中にPythonエラーが発生しましたが、サブプロセス/ usr / bin / dpkgがエラーコード(1)を返しましたか?

autoremoveコマンドまたはupdateを実行しているとき、あるいはインストールコマンドを実行しているときに、次のエラーが発生します。

私のシステムはUbuntu15.04から14.04にアップグレードされ、Linuxカーネルは4.00から3.19にアップグレードされています。そして、Python 3.4.3をインストールし、pythonでpython3を使用できるようになりました。 コマンド。

完全に悪い状態なので助けてください。 TIA

[email protected]:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-3.19.0-16-generic linux-image-extra-3.19.0-16-generic
0 upgraded, 0 newly installed, 2 to remove and 55 not upgraded.
13 not fully installed or removed.
Need to get 0 B/89.4 kB of archives.
After this operation, 208 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 391390 files and directories currently installed.)
Removing linux-image-extra-3.19.0-16-generic (3.19.0-16.16) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic

run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-16-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.0.0-040000-generic
Found initrd image: /boot/initrd.img-4.0.0-040000-generic
Found linux image: /boot/vmlinuz-3.19.0-21-generic
Found initrd image: /boot/initrd.img-3.19.0-21-generic
Found linux image: /boot/vmlinuz-3.19.0-20-generic
Found initrd image: /boot/initrd.img-3.19.0-20-generic
Found linux image: /boot/vmlinuz-3.19.0-18-generic
Found initrd image: /boot/initrd.img-3.19.0-18-generic
Found linux image: /boot/vmlinuz-3.19.0-16-generic
Found initrd image: /boot/initrd.img-3.19.0-16-generic
Adding boot menu entry for EFI firmware configuration
done
Removing linux-image-3.19.0-16-generic (3.19.0-16.16) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
dkms: removing: open-vm-tools 9.4.6 (3.19.0-16-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  open-vm-tools
Version: 9.4.6
Kernel:  3.19.0-16-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vmhgfs.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.19.0-16-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vmxnet.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.19.0-16-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
dkms: removing: vboxhost 4.3.28 (3.19.0-16-generic) (x86_64)

-------- Uninstall Beginning --------
Module:  vboxhost
Version: 4.3.28
Kernel:  3.19.0-16-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.19.0-16-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.19.0-16-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.19.0-16-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.19.0-16-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
update-initramfs: Deleting /boot/initrd.img-3.19.0-16-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.19.0-16-generic /boot/vmlinuz-3.19.0-16-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.0.0-040000-generic
Found initrd image: /boot/initrd.img-4.0.0-040000-generic
Found linux image: /boot/vmlinuz-3.19.0-21-generic
Found initrd image: /boot/initrd.img-3.19.0-21-generic
Found linux image: /boot/vmlinuz-3.19.0-20-generic
Found initrd image: /boot/initrd.img-3.19.0-20-generic
Found linux image: /boot/vmlinuz-3.19.0-18-generic
Found initrd image: /boot/initrd.img-3.19.0-18-generic
Adding boot menu entry for EFI firmware configuration
done
Setting up python-appindicator (12.10.1+15.04.20141110-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-appindicator (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-keyring (4.0-1ubuntu1) ...
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-keyring (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-lazr.uri (1.0.3-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-lazr.uri (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-simplejson (3.6.5-1ubuntu1) ...
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-simplejson (--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-wadllib:
 python-wadllib depends on python-lazr.uri; however:
  Package python-lazr.uri is not configured yet.

dpkg: error processing package python-wadllib (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up python-oauth (1.0.1-4) ...
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-oauth (--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-lazr.restfulclient:
 python-lazr.restfulclient depends on python-lazr.uri; however:
  Package python-lazr.uri is not configured yet.
 python-lazr.restfulclient depends on python-simplejson; however:
  Package python-simplejson is not configured yet.
 python-lazr.restfulclient depends on python-wadllib (>= 1.1.4); however:
  Package python-wadllib is not configured yet.
 python-lazr.restfulclient depends on python-oauth; however:
  Package python-oauth is not configured yet.

dpkg: error processing package python-lazr.restfulclient (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python-launchpadlib:
 python-launchpadlib depends on python-keyring (>= 0.5); however:
  Package python-keyring is not configured yet.
 python-launchpadlib depends on python-lazr.restfulclient (>= 0.11.2); however:
  Package python-lazr.restfulclient is not configured yet.
 python-launchpadlib dependsNo apport report written because MaxReports is reached already
                                                                                          No apport report written because MaxReports is reached already
                                                         on python-lazr.uri (>= 1.0.2-4~); however:
  Package python-lazr.uri is not configured yet.
 python-launchpadlib depends on python-oauth; however:
  Package python-oauth is not configured yet.
 python-launchpadlib depends on python-simplejson; however:
  Package python-simplejson is not configured yet.
 python-launchpadlib depends on python-wadllib; however:
  Package python-wadllib is not configured yet.

dpkg: error processing package python-launchpadlib (--configure):
 dependency problems - leaving unconfigured
Setting up python-secretstorage (2.1.1-1ubuntu1) ...
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-secretstorage (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              dpkg: error processing package python-aptdaemon (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of python-aptdaemon.gtk3widgets:
 python-aptdaemon.gtk3widgets depends on python-aptdaemon (= 1.1.1+bzr982-0ubuntu3); however:
No apport report written because MaxReports is reached already
                                                                Package python-aptdaemon is not configured yet.

dpkg: error processing package python-aptdaemon.gtk3widgets (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of software-center:
 software-center depends on python-aptdaemon (>= 0.40); however:
  Package python-aptdaemon is not configured yet.
 software-center depends on python-aptdaemon.gtk3widgets; however:
  Package python-aptdaemon.gtk3widgets is not configured yet.

dpkg: error processing package software-center (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of y-ppa-manager:
 y-ppa-manager depends on python-launchpadlib; however:
  Package python-launchpadlib is not configured yet.
 y-ppa-manager depends on python-appindicator; however:
  Package python-appindicator is not configured yet.

dpkg: error processing package y-ppa-manager (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python-appindicator
 python-keyring
 python-lazr.uri
 python-simplejson
 python-wadllib
 python-oauth
 python-lazr.restfulclient
 python-launchpadlib
 python-secretstorage
 python-aptdaemon
 python-aptdaemon.gtk3widgets
 software-center
 y-ppa-manager

E: Sub-process /usr/bin/dpkg returned an error code (1)

更新
提案されたように、私は3つのステップすべてを試しました

関連:NVIDIAドライバーをインストールした後のメインアカウントとゲストアカウントのログインループ?

1. sudo apt-get autoremoveに投稿したのと同じエラーを生成する最初のステップ

2. .debからインストールする2番目の代替方法 次のエラーが発生しています

[email protected]:~/Downloads$ sudo dpkg -i python-configparser_3.3.0r2-2_all.deb
(Reading database ... 386190 files and directories currently installed.)
Preparing to unpack python-configparser_3.3.0r2-2_all.deb ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
                         ^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
File "/usr/bin/pyclean", line 63
except (IOError, OSError), e:
                         ^
SyntaxError: invalid syntax
dpkg: error processing archive python-configparser_3.3.0r2-2_all.deb (--install):
subprocess new pre-removal script returned error exit status 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 while cleaning up:
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python-configparser_3.3.0r2-2_all.deb
  1. 3番目の選択肢として、compressed fileをダウンロードしました。 コマンドを抽出して再度実行すると、エラーが発生しました。

    [email protected]:~/Downloads$ cd configparser-3.3.0r2 && sudo python setup.py install
    Traceback (most recent call last):
      File "setup.py", line 12, in <module>
    from setuptools import setup, find_packages
      File "/usr/local/lib/python3.4/site-packages/setuptools/__init__.py", line 4, in <module>
    import distutils.core
      File "/usr/Python-3.4.3/Lib/distutils/core.py", line 18, in <module>
    from distutils.config import PyPIRCCommand
      File "/usr/Python-3.4.3/Lib/distutils/config.py", line 7, in <module>
    from configparser import ConfigParser
      File "/home/vivek/Downloads/configparser-3.3.0r2/configparser.py", line 397
    _KEYCRE = re.compile(ur"%\(([^)]+)\)s")
                                         ^
    SyntaxError: invalid syntax
    

OSで何が起こっているのか理解できません。
助けてくれてありがとう。

関連:flashplugin-installer vs. flashplugin-nonfree vs. adobe-flashplugin?

承認された回答:

最初のエラーはモジュールの欠落であるようです:

ImportError: No module named 'ConfigParser'

python-configparserをインストールしてみてください と:

sudo apt-get install python-configparser

apt-getで機能しない場合 debパッケージをダウンロードして、次のコマンドで手動でインストールしてみてください:

sudo dpkg -i python-configparser_3.3.0r2-2_all.deb

3番目のオプション(@Byte Commanderに感謝)として、ソースからconfigparserをインストールできます:

  • pypiからvividで利用可能なバージョンをダウンロードして抽出します:configparser-3.3.0r2.tar.gz

  • 次のコマンドでインストールします:

    cd configparser-3.3.0r2 && sudo python setup.py install
    

次に、apt-getを使用してパッケージのインストールを再試行します :

sudo apt-get install python-launchpadlib

Ubuntu
  1. Ubuntuで「サブプロセス/usr/ bin / dpkgがエラーコード(1)を返しました」を解決する方法

  2. Linuxは複数の連続したパスセパレーター(/ home //// username /// file)をどのように処理しますか?

  3. Ubuntu – / usr / bin/hostは再起動後も/etc/ hostsへの変更を取得しませんか?

  1. 「e:サブプロセス/ usr / bin / dpkgがエラーコード(1)を返しました」これはどういう意味ですか?

  2. Linux – / usr/binと/usr/sbinを/bin(gnu / linux)にマージしますか?

  3. バイナリを /bin、/sbin、/usr/bin、および /usr/sbin にインストールし、 --prefix および DESTDIR と対話します

  1. Ubuntuでの「dpkg:エラー:ファイル‘/ var / lib / dpkg /updates/0014‘の解析」エラーを修正

  2. サブプロセスの修正/usr/ bin / dpkgがエラーコード(1)を返しました

  3. /bin と /usr/bin の違い