web-dev-qa-db-ja.com

処理中にエラーが発生しました:/var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb

試している間に

Sudo apt-get upgrade 

l次を取得します。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  apport
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
28 not fully installed or removed.
Need to get 0 B/120 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 534975 files and directories currently installed.)
Preparing to unpack .../apport_2.20.1-0ubuntu2.6_all.deb ...
/var/lib/dpkg/info/apport.prerm: 19: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 19: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

apportの問題点と

dpkg: error while cleaning up:

そして

subprocess installed post-installation script returned error exit status 127
    Errors were encountered while processing:
     /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

試した:

Sudo dpkg --purge --force-all apport

それから私は得た:

dpkg: warning: overriding problem because --force enabled:
dpkg: warning: package is in a very bad inconsistent state; you should
 reinstall it before attempting a removal
(Reading database ... 534968 files and directories currently installed.)
Removing apport (2.20.1-0ubuntu2.5) ...
/var/lib/dpkg/info/apport.prerm: 19: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: error processing package apport (--purge):
 subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 apport

その後 :

/var/lib/dpkg/info/apport.postinst/var/lib/dpkg/info/apport.prermの両方がシステムに存在することを確認し、確認できました。

次のすべてのコマンドが機能しませんでした。

Sudo apt-get install apport --reinstall
Sudo dpkg --purge --force-all apport
Sudo apt-get clean 
Sudo apt purge apport
Sudo apt install apport
Sudo apt -f install
udo dpkg -i --force-overwrite apport
dpkg -i --force-overwrite /var/cache/apt/archives/apport_2.20.1-0ubuntu2.6_all.deb
Sudo apt-get -o Dpkg::Options::="--force-overwrite" install apport-dev

edit1 lも試しました

Sudo dpkg -r man-dbしかし、ここで動かなくなる:

    dpkg: error processing package man-db (--remove):
     dependency problems - not removing
    Errors were encountered while processing:
 man-db

その後、次を実行することはできません

Sudo dpkg -r apport 
Sudo apt-get upgrade
Sudo apt-get install -f
3
vincent75

私は同じエラーがあったので、これを使用して修正しました

Sudo dpkg --purge path/package.deb
Sudo apt-get -f install
Sudo apt-get update && Sudo apt-get upgrade