gpt4 book ai didi

cpython - 在 Ubuntu 16.04 上编译 cpython 代码

转载 作者:行者123 更新时间:2023-12-04 04:20:57 27 4
gpt4 key购买 nike

我是按照官方cpython代码link here上的说明操作的.我做了一个

hg update 3.5

然后做了以下。
sudo apt-get build-dep python3.5

但它抛出了一个错误,说明了下面列出的语句:
Reading package lists... Done
Picking 'python3-defaults' as source package instead of 'python3'
E: Unable to find a source package for python3

我确实阅读了有关降低版本并尝试上述代码集的信息,这也因以下原因而失败。
$ hg update 2.7
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ sudo apt-get build-dep python2.7
Reading package lists... Done
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:
builddeps:python2.7 : Depends: libdb5.1-dev but it is not installable
E: Unable to correct problems, you have held broken packages

为了解决上述错误,我做了以下也引发了错误。
$ sudo apt-get install libdb5.1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libdb5.1-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libdb5.1-dev' has no installation candidate

为了解决该错误,我尝试执行以下操作。
$ sudo apt-get install libdb5.1++-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libdb5.1++-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'libdb5.1++-dev' has no installation candidate

最后我做到了。
sudo apt-get install libdb++-dev

它已经安装了,但是 build-dep 没有指向它并且仍然抛出一个错误。

我不确定出了什么问题?有人可以帮忙吗?

提前致谢!

最佳答案

你没有说你有什么版本的 libdb。 Libdb++ 仅适用于将使用 C++ 接口(interface)的程序,我认为您不需要。我看到 libdb 版本 5.3.21 和 libdb4 版本 4.8.30。如果您已经有版本 5.3.21,动态库应该是用户/usr/lib64 作为 libdb-5.3.so 和指向该库 libdb-5.so 的链接。 (我在 CentOS 上工作,所以 Ubuntu 可能略有不同。)您可以创建另一个从 libdb-5.1.so 到您拥有的库的链接,重新安装 python3.5 并使用 --no 告诉 apt-get 忽略依赖项-deps 选项。

关于cpython - 在 Ubuntu 16.04 上编译 cpython 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38933716/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com