我只是在编写脚本期间注意到,很难确保已安装快照并刷新(如果已安装),因为snap install
如果已安装快照则失败,snap refresh
如果尚未安装快照则失败。--help
我是否缺少任一命令中列出或未列出的某些选项?
我知道如何用 bash 编写这个脚本snap list
,甚至是基本的脚本||
(缺少大量错误情况)。但总得有个选择吧?
我使用的是 Ubuntu 23.10。
我只是在编写脚本期间注意到,很难确保已安装快照并刷新(如果已安装),因为snap install
如果已安装快照则失败,snap refresh
如果尚未安装快照则失败。--help
我是否缺少任一命令中列出或未列出的某些选项?
我知道如何用 bash 编写这个脚本snap list
,甚至是基本的脚本||
(缺少大量错误情况)。但总得有个选择吧?
我使用的是 Ubuntu 23.10。
我让计算机运行了一夜,看起来它随机决定在早上 6 点左右重新启动。这是相关行的输出sudo journalctl -b -1 -n2000
:
Dec 08 06:15:49 danilaberezin-workstation systemd[1]: Starting Daily apt upgrade and clean activities...
Dec 08 06:15:50 danilaberezin-workstation systemd[1]: Stopping Session 92 of User danila...
我认为重启是由每日升级服务引起的,但不是积极的。
这是我的输出lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
在 Ubuntu 22.04 LTS 上,我可以在不删除 snapd 的情况下安全地删除 Snap Store 吗?
我使用了一些 snap,但我并不真正使用 ubuntu 软件应用程序(snap 商店),所以我想知道是否可以安全地删除它,同时保留从终端进一步更新和安装 snap 的能力。
我们有大约 1,000 多台设备分布在不同的地理位置,其中一些位于非常偏远的地方,连接性非常有限。
我们希望在 GCP 的多个区域中创建快照存储代理。
例如,美国东部有 2 个负载平衡,美国西部有 2 个,南美洲有 2 个,澳大利亚有 2 个。所有这些都将利用相同的(复制的)Google Cloud SQL 服务器。
这是出于以下几个原因:
注册页面上写着:
出于评估目的,我们会自动授予最多 25 台设备的使用权。
这究竟意味着什么?这是否意味着我只能有 25 个代理主机,或者是否意味着我的代理后面只能有 25 个设备?如果是后者,我该如何增加这个数字,因为我们将有 1,000 多个设备使用我们的代理。
请指教。
将依赖您的帮助。
我正在尝试创建一个快照(通过snapcraft
),但其执行失败,因为
# Fatal error in: ../../media/engine/adm_helpers.cc, line 39
# last system error: 88
# Check failed: 0 == adm->Init() (0 vs. -1)
# Failed to initialize the ADM.
正如我从https://groups.google.com/g/discuss-webrtc/c/C3o0-NWqdn4了解到的,它与 WebRTC 的使用有关。
您可以帮助将依赖项注入到配置文件中(在https://snapcraft.io/docs/supported-interfacessnapcraft.yaml
上没有找到任何相关内容):
name: fingrom
base: core22
grade: stable
confinement: strict
apps:
fingrom:
command: fingrom
plugs: [home, desktop, desktop-legacy, network, network-bind, opengl, x11]
extensions: [gnome]
parts:
app-finance:
source: .
plugin: flutter
build-packages: [libgtk-3-dev, ninja-build]
stage-packages: [libgtk-3-0]
flutter-target: lib/main.dart
提前致谢!
PS Devmode 无法帮助识别问题 ( snap install fingrom --devmode
),应用程序正在运行
通过使用sudo mount -t squashfs -o ro ./fingrom.snap ./tmp
我已经能够在里面运行该应用程序。但如果从 Discover 安装它,“运行”按钮不会执行任何操作。怎么解决呢?提前致谢!
它是通过使用以下方法从 Flutter 项目生成的snapcraft
:
name: fingrom
base: core22
version: 1.0.0+1
grade: stable
confinement: strict
apps:
fingrom:
command: fingrom
parts:
app-finance:
source: .
plugin: flutter
build-packages: [libgtk-3-dev, ninja-build]
flutter-target: lib/main.dart
$ snap run Fingrom
error: cannot find current revision for snap Fingrom: readlink /snap/Fingrom/current: no such file or directory
$ snap run fingrom
error: cannot find app "fingrom" in "fingrom"
将不胜感激您的帮助。
更新
中snapcraft.yaml
它已经丢失:
apps:
fingrom:
command: fingrom
添加该部分后,错误更改为:error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory
。不清楚,因为我可以从其文件夹手动运行它:/snap/fingrom/current/。
我尝试卸载快照系统,但似乎有一些我不知道或不理解的事情。我尝试重新安装:
sudo snap install snap-store
2023-10-18T12:03:29-04:00 INFO Waiting for automatic snapd restart... error: cannot perform the following tasks:
- Mount snap "gtk-common-themes" (1535) (cannot proceed, expected snap "gtk-common-themes" revision 1535 to be mounted but is not)
- Mount snap "gnome-42-2204" (141) (cannot proceed, expected snap "gnome-42-2204" revision 141 to be mounted but is not)
有想法该怎么解决这个吗?在我决定稍后卸载/删除之前,我宁愿让一切再次正常运行。
谢谢。
乌班图23.10.1
我刚刚按照此官方指南(主要是)运行我的 Nextcloud 实例,成功安装并配置了适用于 Intel Dawson Canyon 和 June Canyon NUC 的 Ubuntu Core 18 映像。
对我来说,选择 Ubuntu Core 是为了在手动 OPS 操作上花费尽可能少的时间。多年来它一直做得很好(在安装之前,我的服务器是在 raspi 上)。
完成迁移到这台新服务器(物理机,英特尔 NUC)后,我认为启用 Livepatch 会很酷。
我有一个 Ubuntu 帐户,其中我的 Ubuntu 成员已激活(可能有 50 台机器,只有 1 台处于活动状态:我的桌面),所以我的Ubuntu Pro 仪表板如下所示:
我已经安装了canonical-livepatch
snap,并尝试将我的服务器附加到我的帐户(请注意,我的 ubuntu 核心计算机已经“链接”到我的帐户以添加我的 sudoer 用户+ssh 密钥,在 Ubuntu Core 安装步骤中,不确定它是否有效) :
$ sudo canonical-livepatch status --verbose
Machine is not enabled. Please run 'sudo canonical-livepatch enable' with the token obtained from https://ubuntu.com/livepatch.
$ sudo canonical-livepatch enable
token not provided
$ sudo canonical-livepatch enable HereIsMyToken
failed to register client: unauthorized
$ sudo canonical-livepatch attach HereIsMyToken
subcommand "attach" unknown
官方指南提到了 Ubuntu Core 上不存在的命令行或只是过时的命令行(sudo pro attach TheToken
、sudo ua attach TheToken
、 …),但手册明确说明了 后的令牌enable
。它仍然失败。我做错了吗?
$ sudo canonical-livepatch enable --help
canonical-livepatch enable - enable livepatching on the machine
USAGE:
canonical-livepatch enable <token>
FLAGS:
--az (= "")
The availability zone of the instance the livepatch client is being enabled on.
--cloud (= "")
The public cloud name this livepatch client is being enabled on.
--region (= "")
The region of the instance the livepatch client is being enabled on.
这里稍微检查一下我的连接是否正常(无论如何,我刚才安装了快照。):
$ ping canonical.com
PING canonical.com(website-content-cache-1.canonical.com (2620:2d:4000:1::26)) 56 data bytes
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=1 ttl=54 time=8.74 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=2 ttl=54 time=8.72 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=3 ttl=54 time=8.68 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=4 ttl=54 time=8.71 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=5 ttl=54 time=8.76 ms
64 bytes from website-content-cache-1.canonical.com (2620:2d:4000:1::26): icmp_seq=6 ttl=54 time=8.73 ms
^C
--- canonical.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5009ms
rtt min/avg/max/mdev = 8.682/8.726/8.761/0.059 ms
有没有办法找出特定 Snap 的可用插头?
我想运行以下命令:
snap connect pciutils:<plug> :system-observe
但是,我怎么知道用什么替换“<plug>”?我可以运行命令来获取 pciutils 或 pciutils.lspci 的可用插件列表吗?
$ snap refresh
error: cannot perform the following tasks:
- Setup snap "spotify" (63) security profiles (cannot update mount namespace of snap "spotify": cannot update preserved namespace of snap "spotify": cannot update snap namespace: remove /usr/bin/gjs: read-only file system)
$ spotify
ERROR: not connected to the gnome-3-28-1804 content interface.