Cx_freeze - 如何将共享库安装到 /usr/lib

发布于 2024-10-06 05:37:04 字数 144 浏览 0 评论 0原文

我正在使用 cx_freeze 编译我的 python 脚本,当我编译程序时,所有文件都放置在一个指定的文件夹中。如果共享库不在同一目录中,则可执行文件将不会运行。

我将如何设置它以便可执行文件在 /usr/lib/PROGRAMNAME/ 中查找以运行库?

I am using cx_freeze to compile my python script and when I compile the program, all the files are placed in one specified folder. The executable wont run if the shared libs are not within the same directory.

How would I set it up so the executable looks within /usr/lib/PROGRAMNAME/ to run the libraries?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风吹雨成花 2024-10-13 05:37:04

bbfreeze 会将所有内容放入一个可执行文件中。

bbfreeze will put everything in a single executable.

风向决定发型 2024-10-13 05:37:04

您可以使用以下 cx_Freeze 命令来完成此操作:

python3 setup.py install --prefix=/usr

这将部署:

  1. 所有生成的文件(*.solibrary.zip 和包含的文件)到 /usr/ lib/YourAppName/
  2. /usr/bin/yourapp 符号链接到 /usr/lib/YourAppName/yourapp

You can do it with the following cx_Freeze command :

python3 setup.py install --prefix=/usr

This will deploy:

  1. all generated files (*.so, library.zip and included files) into /usr/lib/YourAppName/
  2. /usr/bin/yourapp symlinking to /usr/lib/YourAppName/yourapp.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文