从 ubuntu3.8 上的源代码构建 python16.04,我遇到了一些在其他帖子中没有看到的问题

build python3.8 from source on ubuntu16.04,I encountered some problems that I didn't see in other posts

提问人:moss 提问时间:10/31/2023 更新时间:10/31/2023 访问量:18

问:

我按照这个教程:链接在这里输入图像描述

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

然后我遇到一个错误:

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.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.1ubuntu2).
libncurses5-dev is already the newest version (6.0+20160213-1ubuntu1).
wget is already the newest version (1.17.1-1ubuntu1.4).
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:
 libnss3-dev : Depends: libnss3 (= 2:3.21-1ubuntu4) but 2:3.28.4-0ubuntu0.16.04.4 is to be installed
               Depends: libnspr4-dev (>= 4.6.6-1) but it is not going to be installed
 libssl-dev : Depends: libssl1.0.0 (= 1.0.2g-1ubuntu4) but 1.0.2g-1ubuntu4.14 is to be installed
              Recommends: libssl-doc but it is not going to be installed
 zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-2ubuntu4) but 1:1.2.8.dfsg-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
x2000@pc:~/python3.8.1$ ls
init.sh  Python-3.8.1  Python-3.8.1.tgz
x2000@pc:~/python3.8.1$ 

错误

我不明白这是什么意思,我想知道如何解决它并构建python

我尝试了方法2,它也失败了

python-3.x 乌班图-16.04

评论

0赞 tripleee 10/31/2023
Ubuntu 16.04 于 2021 年停产。可能尝试更新的版本。另外,请不要发布代码、错误消息或其他文本数据的图像。
0赞 moss 10/31/2023
对不起,这是我第一次发帖,我会根据您的建议更正我后续的帖子。感谢您的建议.

答: 暂无答案