全新安装的 18.04 版 Python3-dev 版本发生冲突

全新安装的 18.04 版 Python3-dev 版本发生冲突

与此堆栈交换中的其他帖子一样,我在运行预安装的 python3(3.6.9-1~18.04)的全新 Ubuntu(18.04)上安装 python3-dev 时遇到问题。我尝试过的这些帖子中推荐的许多修复方法都有效,例如卸载并重新安装 python3。我不得不两次将笔记本电脑恢复为出厂默认设置,因为 apt 最终通过修改 python3 破坏了操作系统的大部分功能。Aptitude 也无法解决冲突。

更具体地说,当我尝试这样做时,sudo apt install python3-dev我得到了以下信息:

Reading package lists... Done
Building dependency tree      
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-dev : Depends: python3 (= 3.6.5-3) but 3.6.7-1~18.04 is to be installed
               Depends: libpython3-dev (= 3.6.5-3) but it is not going to be installed
               Depends: python3.6-dev (>= 3.6.5-2~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

以下是运行的输出sudo apt update

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                    
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease                    
Ign:4 http://oem.archive.canonical.com/updates bionic-oem InRelease            
Ign:5 http://dell.archive.canonical.com/updates bionic-dell-beaver-osp1-gendry InRelease
Hit:6 http://oem.archive.canonical.com/updates bionic-oem Release
Ign:7 http://dell.archive.canonical.com/updates bionic-dell-service InRelease
Hit:9 http://dell.archive.canonical.com/updates bionic-dell InRelease
Hit:10 http://dell.archive.canonical.com/updates bionic-dell-beaver-osp1-gendry Release
Hit:12 http://dell.archive.canonical.com/updates bionic-dell-service Release
Reading package lists... Done
Building dependency tree      
Reading state information... Done
All packages are up to date.

输出为sudo apt 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.

我将非常感激任何帮助我解决这些问题的方法。目前无法升级到最新版本的 Ubuntu (20.04)。

相关内容