web-dev-qa-db-ja.com

アップグレード後の依存関係の破損

apt-get upgradeの後、次のエラーが表示されました。

Reading package lists... Done
Building dependency tree      
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.  
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error     from a previous failure.
                      Errors were encountered while processing:
 python3.3-minimal
 python3.3
E: Sub-process /usr/bin/dpkg returned an error code (1)

コンピューターの電源を切ることができません...

python 3.3を正しくインストールしなかったと思いますが、どうすれば修復できますか?

編集:私はapt-get --reinstall install python2 python2-supportを試しましたが、私は得ました:同じエラー

編集:詳細

私のシステム:Linux Mycomputer 3.5.0-34-generic#55-Ubuntu SMP Thu Jun 6 20:20:19 UTC 2013 i686 i686 i686 GNU/Linux

dpkg --print-architecture   
i386

以前、ubuntu 12.10を使用していました。 13.04にアップグレードしようとしたときに問題が発生しました。エラーが多すぎるためプロセスが停止したことを知らせるエラーメッセージが表示されました。

その後、Sudo apt-get update && Sudo apt-get upgradeを実行しようとしましたが、上記のエラーが発生しました。

数か月前に誤ってpython2をコンピューターから削除したときに、同様の問題が発生しました。その後、アイコンをクリックして(応答しない)コンピューターの電源をオフにすることができませんでした。唯一の方法は、強制的に手動でシャットダウンすることでした。再び電源を入れたとき、デスクトップが空で、何もできませんでした。これは、システム全体を再インストールすることで修正されました。

インターネットで検索して、いくつかのコマンドを試しました。

Sudo dpkg --configure -a

結果として

Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
       import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
      File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.


Sudo apt-get --reinstall install python3 python3-support
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python3-support


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.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)




dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3
 python3.3


python --version

Python 2.7.4を返します

やること:

cd /tmp
Sudo apt-get download python3
Sudo dpkg -i python3*.deb && apt-get dist-upgrade

返却値

    (Reading database ... 374310 files and directories currently installed.)
Preparing to replace python3 3.3.1-0ubuntu1 (using python3_3.3.1-0ubuntu1_i386.deb) ...
running python pre-rtupdate hooks for python3.3...
Unpacking replacement python3 ...
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db ...
Errors were encountered while processing:
 python3

また、python3を削除して再インストールしようとしました

助けてください?

Gx1sptDTDaの答えの後に編集

Sudo apt-get clean
Sudo apt-get dist-upgrade 

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

編集:python3.3-minimalのすべての依存関係のインストール

Sudo apt-get install libc6 libexpat1 libpython3.3-minimal zlib1g

返却値

Reading package lists... Done
Building dependency tree       
Reading state information... Done
libc6 is already the newest version.
libexpat1 is already the newest version.
libpython3.3-minimal is already the newest version.
libpython3.3-minimal set to manually installed.
zlib1g is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up python3.3-minimal (3.3.1-1ubuntu5) ...
Traceback (most recent call last):
  File "/usr/lib/python3.3/py_compile.py", line 8, in <module>
    import imp
  File "/usr/lib/python3.3/imp.py", line 28, in <module>
    import tokenize
  File "/usr/lib/python3.3/tokenize.py", line 28, in <module>
    import re
  File "/usr/lib/python3.3/re.py", line 122, in <module>
    import sre_compile
  File "/usr/lib/python3.3/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/usr/lib/python3.3/sre_parse.py", line 17, in <module>
    from sre_constants import *
   File "/usr/lib/python3.3/sre_constants.py", line 18, in <module>
     from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT
dpkg: error processing python3.3-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.3-minimal (>= 3.3.1-1~); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3-minimal (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3.3:
 python3.3 depends on python3.3-minimal (= 3.3.1-1ubuntu5); however:
  Package python3.3-minimal is not configured yet.

dpkg: error processing python3.3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3.3 (>= 3.3.1-1~); however:
  Package python3.3 is not configured yet.
 python3 depends on python3-minimal (= 3.3.1-0ubuntu1); however:
  Package python3-minimal is not configured yet.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python3.3-minimal
 python3-minimal
 python3.3
 python3
E: Sub-process /usr/bin/dpkg returned an error code (1)

編集:Sudo dbkg-reconfigure -a

1 /質問:──────────────────────────────┤Adduser├─────────────── ───────────────────┐
││
│デフォルトでは、ユーザーのホームディレクトリは、
│システム。セキュリティとプライバシーを強化したい場合、│
│ホームディレクトリは、所有者のみが読み取り可能です。しかし、疑わしい場合は、│
│このオプションを有効のままにします。 │
││
│これは、今後│で追加されたユーザーのホームディレクトリにのみ影響します。
│adduserコマンド。 │
││
│システム全体で読み取り可能なホームディレクトリが必要ですか?

はいと言った

2 /┤防具の設定├───────────────────────────┐
│ユーザーの追加の場所のスペース区切りリストを入力してください│
│ホームディレクトリ。これらの場所は、│で指定された場所に追加されます
│/etc/apparmor.d/tunables/home。末尾は「/」にする必要があります。 │
││
│例:ユーザーのディレクトリが/ srv/nfs/homeおよび│に保存されている場合
│/ mnt/homes、「/ srv/nfs/home// mnt/homes /」と入力する必要があります。 │
││
│追加のホームディレクトリの場所:

どの場所を示すかわからない...だから私はただ渡す

最後に、私はシェルで読みました:

update-rc.d: warning: /etc/init.d/acpi-support missing LSB information
update-rc.d: see <http://wiki.debian.org/LSBInitScripts>
acpid stop/waiting
acpid start/running, process 24816
 * Starting AppArmor  

profiles                                                              Skipping      
 profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                     [ OK ]
 * Reloading AppArmor profiles                                                  
Skipping     profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
                                                                     [ OK ]
gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <[email protected]>" 
not     changed
gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <[email protected]>" 
not     changed
gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012)  
  <[email protected]>"     not changed
gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) 
<[email protected]>"     not changed
gpg: Total number processed: 4
gpg:              unchanged: 4
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'
/usr/sbin/dpkg-reconfigure: asymptote is broken or not fully installed

編集:Synaptic synapticには、「壊れた依存関係」は表示されません(ステータスをクリックすると、表示されるのはすべて:インストール済み(ローカルまたは廃止)インストール済み(手動)未インストール未インストール(残余) config)

7
bigTree

編集

この問題は、次のバグレポートに関連していました。 https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1165281

コメント#3から#5の手順に従いますが、パスを2.7ではなくpython3.3に変更します。

2
Gx1sptDTDa

別のパッケージlibamd2.3.1:AMD64でも同じ問題が発生しました。私はこのエラーを受け取りました:

> Sudo apt upgrade
[...]
Errors were encountered while processing:
 libamd2.3.1:AMD64
E: Sub-process /usr/bin/dpkg returned an error code (1)

this threadに続いて、dpkgで削除し、aptで再インストールしました。

Sudo dpkg --remove --force-remove-reinstreq libamd2.3.1:AMD64
Sudo apt-get install libamd2.3.1:AMD64
0
ErnestScribbler