gpt4 book ai didi

linux - 将 ubuntu 18.04 升级到 20.04 后,简单的 hello world snap 不起作用

转载 作者:行者123 更新时间:2023-12-05 03:46:22 28 4
gpt4 key购买 nike

最近,我开始研究捕捉。我已经学会了使用简单的 hello-gnu 在 Ubuntu 18.04 上捕捉。

之后我已经转移到 ubuntu 20.04。我遇到过很多问题。所以我决定在 ubuntu 20.04 上再次运行 hello-gnu snap。但它因以下错误而失败

$snpacraft    
Launching a VM.,
snap "snapd" has no updates available
core18 20201210 from Canonical✓ installed
"core18" switched to the "latest/stable" channel
snapd is not logged in, snap install commands will use sudo snap "core20" has no updates available
Skipping pull hello-world (already ran)
Skipping build hello-world (already ran)
Skipping stage hello-world (already ran)
Skipping prime hello-world (already ran)
Failed to generate snap metadata: The specified command 'bin/hello' defined in the app 'hello' does not exist.
Ensure that 'bin/hello' is installed with the correct path.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

snapcraft.yaml 如下所示

name: hello-gnu # you probably want to 'snapcraft register <name>'
base: core20 # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Hello simple snap
description: |
This is my-snap's description. You have a paragraph or two to tell the
most important story about your snap. Keep it under 100 words though,
we live in tweetspace and your description wants to look good in the snap
store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

apps:
hello:
command: bin/hello


parts:
hello-world:
# See 'snapcraft plugins'
plugin: autotools
source: http://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz

最佳答案

对于 Core20,如果您将命令路径设置为“usr/local/bin/hello”,它将起作用。

command:usr/local/bin/hello

关于linux - 将 ubuntu 18.04 升级到 20.04 后,简单的 hello world snap 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65329954/

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