1)sudo apt-get install mercurial
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
2)sudo dpkg --configure -a
Setting up python3-lxml (3.5.0-1) ...
/var/lib/dpkg/info/python3-lxml.postinst: 6: /var/lib/dpkg/info/python3-lxml.postinst: py3compile: not found
dpkg: error processing package python3-lxml (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: error processing package gnome-applets-data (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Setting up python3-bs4 (4.4.1-1) ...
/var/lib/dpkg/info/python3-bs4.postinst: 6: /var/lib/dpkg/info/python3-bs4.postinst: py3compile: not found
dpkg: error processing package python3-bs4 (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up python3-html5lib (0.999-3) ...
/var/lib/dpkg/info/python3-html5lib.postinst: 6: /var/lib/dpkg/info/python3-html5lib.postinst: py3compile: not found
dpkg: error processing package python3-html5lib (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up kazam (1.4.5-2) ...
/var/lib/dpkg/info/kazam.postinst: 6: /var/lib/dpkg/info/kazam.postinst: py3compile: not found
dpkg: error processing package kazam (--configure):
subprocess installed post-installation script returned error exit status 127
Setting up gnome-menus (3.13.3-6) ...
/var/lib/dpkg/info/gnome-menus.postinst: 10: /var/lib/dpkg/info/gnome-menus.postinst: gnome-menus-blacklist: not found
dpkg: error processing package gnome-menus (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of gnome-applets:
gnome-applets depends on gnome-applets-data (>= 3.20); however:
Version of gnome-applets-data on system is 3.18.1-2.
gnome-applets depends on gnome-applets-data (<< 3.21); however:
Package gnome-applets-data is not configured yet.
dpkg: error processing package gnome-applets (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-panel:
gnome-panel depends on gnome-menus (>= 3.1.4); however:
Package gnome-menus is not configured yet.
dpkg: error processing package gnome-panel (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-session-flashback:
gnome-session-flashback depends on gnome-panel (>= 3.14); however:
Package gnome-panel is not configured yet.
dpkg: error processing package gnome-session-flashback (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3-lxml
gnome-applets-data
python3-bs4
python3-html5lib
kazam
gnome-menus
gnome-applets
gnome-panel
gnome-session-flashback
3)sudo apt-get install mercurial
Preparing to unpack .../gnome-applets-data_3.20.0-2_all.deb ...
/var/lib/dpkg/info/gnome-applets-data.prerm: 6: /var/lib/dpkg/info/gnome-applets-data.prerm: py3clean: 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: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
dpkg: error processing archive /var/cache/apt/archives/gnome-applets-data_3.20.0-2_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/gnome-applets-data.postinst: 6: /var/lib/dpkg/info/gnome-applets-data.postinst: py3compile: not found
*** Error in `/usr/bin/dpkg': munmap_chunk(): invalid pointer: 0x0000562736e935f1 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x6ee55)[0x7f441940be55]
/lib/x86_64-linux-gnu/libc.so.6(+0x745b6)[0x7f44194115b6]
/usr/bin/dpkg(+0x20060)[0x56273522e060]
/usr/bin/dpkg(+0x204b9)[0x56273522e4b9]
/usr/bin/dpkg(+0x277fa)[0x5627352357fa]
/usr/bin/dpkg(+0x16b07)[0x562735224b07]
/usr/bin/dpkg(+0x16ce5)[0x562735224ce5]
/usr/bin/dpkg(+0x16f2d)[0x562735224f2d]
/usr/bin/dpkg(+0xa287)[0x562735218287]
/usr/bin/dpkg(+0x1ff9b)[0x56273522df9b]
/usr/bin/dpkg(+0x201a1)[0x56273522e1a1]
/usr/bin/dpkg(+0x9d08)[0x562735217d08]
/usr/bin/dpkg(+0x66a9)[0x5627352146a9]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f44193bd700]
/usr/bin/dpkg(+0x67e9)[0x5627352147e9]
======= Memory map: ========
56273520e000-562735252000 r-xp 00000000 08:05 655443 /usr/bin/dpkg
562735452000-562735455000 r--p 00044000 08:05 655443 /usr/bin/dpkg
562735455000-562735456000 rw-p 00047000 08:05 655443 /usr/bin/dpkg
562735456000-56273566a000 rw-p 00000000 00:00 0
5627366b3000-562739fdd000 rw-p 00000000 00:00 0 [heap]
7f44182b8000-7f44182ce000 r-xp 00000000 08:05 3277134 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f44182ce000-7f44184cd000 ---p 00016000 08:05 3277134 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f44184cd000-7f44184ce000 rw-p 00015000 08:05 3277134 /lib/x86_64-linux-gnu/libgcc_s.so.1
7f44184ce000-7f44184d9000 r-xp 00000000 08:05 3277117 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f44184d9000-7f44186d8000 ---p 0000b000 08:05 3277117 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f44186d8000-7f44186d9000 r--p 0000a000 08:05 3277117 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f44186d9000-7f44186da000 rw-p 0000b000 08:05 3277117 /lib/x86_64-linux-gnu/libnss_files-2.23.so
7f44186da000-7f44186e0000 rw-p 00000000 00:00 0
7f44186e0000-7f44186eb000 r-xp 00000000 08:05 3277124 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7f44186eb000-7f44188ea000 ---p 0000b000 08:05 3277124 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7f44188ea000-7f44188eb000 r--p 0000a000 08:05 3277124 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7f44188eb000-7f44188ec000 rw-p 0000b000 08:05 3277124 /lib/x86_64-linux-gnu/libnss_nis-2.23.so
7f44188ec000-7f4418901000 r-xp 00000000 08:05 3277109 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f4418901000-7f4418b00000 ---p 00015000 08:05 3277109 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f4418b00000-7f4418b01000 r--p 00014000 08:05 3277109 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f4418b01000-7f4418b02000 rw-p 00015000 08:05 3277109 /lib/x86_64-linux-gnu/libnsl-2.23.so
7f4418b02000-7f4418b04000 rw-p 00000000 00:00 0
7f4418b04000-7f4418b0b000 r-xp 00000000 08:05 3277111 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7f4418b0b000-7f4418d0a000 ---p 00007000 08:05 3277111 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7f4418d0a000-7f4418d0b000 r--p 00006000 08:05 3277111 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7f4418d0b000-7f4418d0c000 rw-p 00007000 08:05 3277111 /lib/x86_64-linux-gnu/libnss_compat-2.23.so
7f4418d0c000-7f4418d24000 r-xp 00000000 08:05 3277128 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f4418d24000-7f4418f23000 ---p 00018000 08:05 3277128 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f4418f23000-7f4418f24000 r--p 00017000 08:05 3277128 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f4418f24000-7f4418f25000 rw-p 00018000 08:05 3277128 /lib/x86_64-linux-gnu/libpthread-2.23.so
7f4418f25000-7f4418f29000 rw-p 00000000 00:00 0
7f4418f29000-7f4418f2b000 r-xp 00000000 08:05 3277043 /lib/x86_64-linux-gnu/libdl-2.23.so
7f4418f2b000-7f441912b000 ---p 00002000 08:05 3277043 /lib/x86_64-linux-gnu/libdl-2.23.so
7f441912b000-7f441912c000 r--p 00002000 08:05 3277043 /lib/x86_64-linux-gnu/libdl-2.23.so
7f441912c000-7f441912d000 rw-p 00003000 08:05 3277043 /lib/x86_64-linux-gnu/libdl-2.23.so
7f441912d000-7f441919b000 r-xp 00000000 08:05 3276807 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f441919b000-7f441939b000 ---p 0006e000 08:05 3276807 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f441939b000-7f441939c000 r--p 0006e000 08:05 3276807 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f441939c000-7f441939d000 rw-p 0006f000 08:05 3276807 /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f441939d000-7f4419534000 r-xp 00000000 08:05 3277031 /lib/x86_64-linux-gnu/libc-2.23.so
7f4419534000-7f4419734000 ---p 00197000 08:05 3277031 /lib/x86_64-linux-gnu/libc-2.23.so
7f4419734000-7f4419738000 r--p 00197000 08:05 3277031 /lib/x86_64-linux-gnu/libc-2.23.so
7f4419738000-7f441973a000 rw-p 0019b000 08:05 3277031 /lib/x86_64-linux-gnu/libc-2.23.so
7f441973a000-7f441973e000 rw-p 00000000 00:00 0
7f441973e000-7f4419762000 r-xp 00000000 08:05 3277642 /lib/x86_64-linux-gnu/libselinux.so.1
7f4419762000-7f4419961000 ---p 00024000 08:05 3277642 /lib/x86_64-linux-gnu/libselinux.so.1
7f4419961000-7f4419962000 r--p 00023000 08:05 3277642 /lib/x86_64-linux-gnu/libselinux.so.1
7f4419962000-7f4419963000 rw-p 00024000 08:05 3277642 /lib/x86_64-linux-gnu/libselinux.so.1
7f4419963000-7f4419965000 rw-p 00000000 00:00 0
7f4419965000-7f4419989000 r-xp 00000000 08:05 3276843 /lib/x86_64-linux-gnu/ld-2.23.so
7f4419b5a000-7f4419b5e000 rw-p 00000000 00:00 0
7f4419b85000-7f4419b88000 rw-p 00000000 00:00 0
7f4419b88000-7f4419b89000 r--p 00023000 08:05 3276843 /lib/x86_64-linux-gnu/ld-2.23.so
7f4419b89000-7f4419b8a000 rw-p 00024000 08:05 3276843 /lib/x86_64-linux-gnu/ld-2.23.so
7f4419b8a000-7f4419b8b000 rw-p 00000000 00:00 0
7ffdc670b000-7ffdc672c000 rw-p 00000000 00:00 0 [stack]
7ffdc6749000-7ffdc674b000 r--p 00000000 00:00 0 [vvar]
7ffdc674b000-7ffdc674d000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
E: Sub-process /usr/bin/dpkg exited unexpectedly
有人知道如何解决这个问题吗?
编辑:我也尝试重新安装软件包,但之后仍然收到与之前相同的错误消息。4)sudo apt-get install python3-lxml gnome-applets-data python3-bs4 python3-html5lib kazam gnome-menus gnome-applets gnome-panel gnome-session-flashback
43 upgraded, 17 newly installed, 2 to remove and 1274 not upgraded.
10 not fully installed or removed.
Need to get 0 B/112 MB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Reading changelogs... Done
Extracting templates from packages: 100%
(Reading database ... 278711 files and directories currently installed.)
Removing totem-plugins (3.18.1-2) ...
/var/lib/dpkg/info/totem-plugins.prerm: 6: /var/lib/dpkg/info/totem-plugins.prerm: py3clean: not found
dpkg: error processing package totem-plugins (--remove):
subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/totem-plugins.postinst: 6: /var/lib/dpkg/info/totem-plugins.postinst: py3compile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
totem-plugins
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
我觉得 dpkg 有点坏了,你可以试试。
sudo apt-get install --reinstall dpkg
答案2
py3compile:未找到
该py3compile
命令是包的一部分python3-minimal
,但似乎已损坏。
要修复此问题,请尝试以下操作:
通过以下方式纠正存在破坏依赖关系的系统:
sudo apt-get -f install
通过以下方式重新配置所有已解压但未配置的软件包:
sudo dpkg --configure -a
如果上述方法无效,请尝试
python3-minimal
通过以下方式重新安装包:sudo apt install -f --reinstall python3-minimal
或者运行:
apt-get download python3-minimal sudo dpkg -i *python3*.deb sudo apt install -f
或者下载
.pkg
来自 kernel.org 的文件并通过以下方式从文件安装:sudo dpkg -i python3-minimal_*.deb
然后确保py3compile
命令py3clean
可运行并可从变量访问PATH
。