似乎有很多这样的问题,但没有一个能解决我的问题。我试图安装libprotobuf-dev
和protobuf-compiler
软件包。但无法安装。出现此错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
libprotobuf-dev is already the newest version (2.6.1-1.3).
protobuf-compiler is already the newest version (2.6.1-1.3).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
1 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 apport (2.20.1-0ubuntu2.14) ...
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error processing package apport (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
apport
E: Sub-process /usr/bin/dpkg returned an error code (1)
其中一个解决方案告诉我将所有与 apport 相关的文件从 移到/var/lib/dpkg/info
,/tmp
但这也不起作用,我得到了同样的错误。我花了几个小时来解决这个问题。无法解决它。有什么可能的解决办法吗?
答案1
您需要重新安装 pycompile,尝试这个
sudo apt purge apport # purge apport
sudo apt reinstall python-minimal # reinstall python-minimal
sudo apt install apport # install apport
sudo dpkg --configure -a && sudo apt-get install -f # resume last APT session
清除 apport 可确保你可以启动 apport 的全新安装,并重新安装 python-minimal 安装 pycompile,这是 apport 所必需的