gpt4 book ai didi

使用 snapcraft 构建时要跳过 Ubuntu snap 插件 'autotools' 默认 'make install'

转载 作者:行者123 更新时间:2023-12-04 18:45:32 25 4
gpt4 key购买 nike

我正在为我的项目构建一个 snap 包,我有一个我只想编译的库。即仅/configure && make不是:/configure && make && make install
当我在 Ubuntu snap 中搜索它的文档时,我发现:https://snapcraft.io/docs/reference/plugins/autotools

还在这里搜索:https://github.com/search?o=desc&q=filename%3Asnapcraft.yaml+%22plugin%3A+autotools%22+&s=indexed&type=Code&utf8=%E2%9C%93

但我找不到任何可以跳过 make install 的内容部分。谁能建议我怎么做? make install 之后可能是一种肮脏的方式。 ,我将添加一个shell脚本递归删除make install生成的文件,然后继续进行应用程序代码编译。但我认为应该有一个很好的方法来做到这一点。
所以请告诉我是否有任何方法可以跳过 make install当我运行 snapcraft构建快照包。

最佳答案

我通过试错法得到了答案。解决方案是:

artifacts: [.]

在 snapcraft.yaml 文件中。根据文档,它使默认的 make install 跳过。我把它保持为零,但没有工作。但是这个工作得很好,permision denied 错误也消失了(snapcraft 想安装在系统中,因此 sudo 是那里的解决方案)。

关于使用 snapcraft 构建时要跳过 Ubuntu snap 插件 'autotools' 默认 'make install',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44650211/

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