Skip to main content
 首页 » 编程设计

python之安装较低版本的 GLIBC 并运行 pyinstaller

2025年05月04日14thcjp

我正在尝试创建 PyGTK 应用程序的可执行文件。但是我在客户端机器上运行可执行文件时遇到 Glibc 版本冲突。(因为客户端机器上的 glibc(2.5) 版本低于创建 pyinstaller 可执行文件的 glibc(2.13) 版本。)

所以我想知道

是否可以在已经运行高版本 GLIBC 的机器上单独安装低版本 GLIBC(保留多个 GLIBC 副本)?

有什么方法可以让 pyinstaller 在创建可执行文件时选择 GLIBC 版本?

如果以上是可能的,那么如何实现呢?

提前致谢

请您参考如下方法:

Is it possible to install lower version of GLIBC separately in the machine where higher version of GLIBC is already running(Keeping multiple copies of GLIBC)?

是的,这是可能的(我们每天都这样做)。这并非完全微不足道,您实际上不需要那样来解决您的问题。

And Is there any way we can tell pyinstaller to choose a version of GLIBC while creating an executable?

你想要的是一个 Linux-to-(older)-Linux 交叉编译器。 GCC 可以配置为这样的交叉编译器。这也不完全是微不足道的。

列出了一些更简单的解决方案 here .