Emi*_*jer 4 package-management apt dpkg
Ubuntu:18.04
当我尝试这样做时, sudo apt-get upgrade
它给了我这个错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libpython3.7-minimal libpython3.7-stdlib
Use 'sudo apt autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
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 python3-software-properties (0.96.24.32.7) ...
/var/lib/dpkg/info/python3-software-properties.postinst: 6: /var/lib/dpkg/info/python3-software-properties.postinst: py3compile: not found
dpkg: error processing package python3-software-properties (--configure):
installed python3-software-properties package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-software-properties
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
但建议的推荐sudo apt autoremove
也显示错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
libpython3.7-minimal libpython3.7-stdlib
0 to upgrade, 0 to newly install, 2 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 12.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 178285 files and directories currently installed.)
Removing libpython3.7-stdlib:amd64 (3.7.1-1~18.04) ...
Removing libpython3.7-minimal:amd64 (3.7.1-1~18.04) ...
Setting up python3-software-properties (0.96.24.32.7) ...
/var/lib/dpkg/info/python3-software-properties.postinst: 6: /var/lib/dpkg/info/python3-software-properties.postinst: py3compile: not found
dpkg: error processing package python3-software-properties (--configure):
installed python3-software-properties package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-software-properties
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
所以看起来py3compile存在一些未找到的问题。我尝试sudo apt-get -f install
以以下结尾:
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-software-properties (0.96.24.32.7) ...
/var/lib/dpkg/info/python3-software-properties.postinst: 6: /var/lib/dpkg/info/python3-software-properties.postinst: py3compile: not found
dpkg: error processing package python3-software-properties (--configure):
installed python3-software-properties package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-software-properties
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
当我尝试时显示相同类型的 py3compile: not found 错误 sudo apt-get install --reinstall python3-minimal
我是 ubuntu 的新手,所以我很高兴能得到一些帮助。
小智 9
这个答案对我有帮助,希望它能解决某人的问题。
通过以下方式重新配置所有未打包但未配置的包:
sudo dpkg --configure -a
Run Code Online (Sandbox Code Playgroud)
如果以上没有帮助,请尝试通过以下方式重新安装 python3-minimal 包:
sudo apt install -f --reinstall python3-minimal
Run Code Online (Sandbox Code Playgroud)
或者运行:
apt-get download python3-minimal
sudo dpkg -i *python3*.deb
sudo apt install -f
Run Code Online (Sandbox Code Playgroud)
或者从 kernel.org 下载 .pkg 文件并通过以下方式从该文件安装:
sudo dpkg -i python3-minimal_*.deb
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8700 次 |
最近记录: |