AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-641898

Force Hero's questions

Martin Hope
Force Hero
Asked: 2019-05-18 07:45:55 +0800 CST

Ubuntu 18.04.2 和 19.04 在 hyper-v 中快速创建的图像不允许我安装任何东西

  • 4

我在 Windows 10 上使用 Hyper-V 中的快速创建功能创建了一个新 VM。

设置 VM 后(我选择了语言设置,创建了密码等),然后我尝试安装 Visual Studio Code 并收到以下错误消息: Unable to install "Visual Studio Code": too early for operation, device not yet seeded or device model not acknowledged.

从调查来看,这似乎是一个快速问题。

这里有一些细节

snap --version:

snap    2.38
snapd   2.38
series  16
ubuntu  18.04
kernel  4.15.0-50-generic

snap changes:

ID   Status  Spawn               Ready               Summary
1    Doing   today at 10:58 BST  -                   Initialize system state
2    Done    today at 10:58 BST  today at 10:58 BST  Initialize device

snap tasks --last=seed:

Status  Spawn               Ready               Summary
Done    today at 10:58 BST  today at 10:58 BST  Ensure prerequisites for "core" are available
Done    today at 10:58 BST  today at 10:58 BST  Prepare snap "/var/lib/snapd/seed/snaps/core_6673.snap" (6673)
Done    today at 10:58 BST  today at 10:58 BST  Mount snap "core" (6673)
Done    today at 10:58 BST  today at 10:58 BST  Copy snap "core" data
Done    today at 10:58 BST  today at 10:58 BST  Setup snap "core" (6673) security profiles
Done    today at 10:58 BST  today at 10:58 BST  Make snap "core" (6673) available to the system
Done    today at 10:58 BST  today at 10:59 BST  Automatically connect eligible plugs and slots of snap "core"
Done    today at 10:58 BST  today at 10:59 BST  Set automatic aliases for snap "core"
Done    today at 10:58 BST  today at 10:59 BST  Setup snap "core" aliases
Done    today at 10:58 BST  today at 10:59 BST  Run install hook of "core" snap if present
Done    today at 10:58 BST  today at 10:59 BST  Start snap "core" (6673) services
Done    today at 10:58 BST  today at 10:59 BST  Run configure hook of "core" snap if present
Done    today at 10:58 BST  today at 10:59 BST  Ensure prerequisites for "gnome-3-26-1604" are available
Done    today at 10:58 BST  today at 10:59 BST  Prepare snap "/var/lib/snapd/seed/snaps/gnome-3-26-1604_82.snap" (82)
Done    today at 10:58 BST  today at 10:59 BST  Mount snap "gnome-3-26-1604" (82)
Done    today at 10:58 BST  today at 10:59 BST  Copy snap "gnome-3-26-1604" data
Done    today at 10:58 BST  today at 10:59 BST  Setup snap "gnome-3-26-1604" (82) security profiles
Done    today at 10:58 BST  today at 10:59 BST  Make snap "gnome-3-26-1604" (82) available to the system
Done    today at 10:58 BST  today at 10:59 BST  Automatically connect eligible plugs and slots of snap "gnome-3-26-1604"
Done    today at 10:58 BST  today at 10:59 BST  Set automatic aliases for snap "gnome-3-26-1604"
Done    today at 10:58 BST  today at 10:59 BST  Setup snap "gnome-3-26-1604" aliases
Done    today at 10:58 BST  today at 10:59 BST  Run install hook of "gnome-3-26-1604" snap if present
Done    today at 10:58 BST  today at 10:59 BST  Start snap "gnome-3-26-1604" (82) services
Done    today at 10:58 BST  today at 10:59 BST  Run configure hook of "gnome-3-26-1604" snap if present
Doing   today at 10:58 BST  -                   Ensure prerequisites for "gnome-calculator" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-calculator_352.snap" (352)
Do      today at 10:58 BST  -                   Mount snap "gnome-calculator" (352)
Do      today at 10:58 BST  -                   Copy snap "gnome-calculator" data
Do      today at 10:58 BST  -                   Setup snap "gnome-calculator" (352) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-calculator" (352) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-calculator"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-calculator"
Do      today at 10:58 BST  -                   Setup snap "gnome-calculator" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-calculator" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-calculator" (352) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-calculator" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gnome-characters" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-characters_206.snap" (206)
Do      today at 10:58 BST  -                   Mount snap "gnome-characters" (206)
Do      today at 10:58 BST  -                   Copy snap "gnome-characters" data
Do      today at 10:58 BST  -                   Setup snap "gnome-characters" (206) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-characters" (206) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-characters"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-characters"
Do      today at 10:58 BST  -                   Setup snap "gnome-characters" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-characters" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-characters" (206) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-characters" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gnome-logs" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-logs_57.snap" (57)
Do      today at 10:58 BST  -                   Mount snap "gnome-logs" (57)
Do      today at 10:58 BST  -                   Copy snap "gnome-logs" data
Do      today at 10:58 BST  -                   Setup snap "gnome-logs" (57) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-logs" (57) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-logs"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-logs"
Do      today at 10:58 BST  -                   Setup snap "gnome-logs" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-logs" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-logs" (57) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-logs" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gnome-system-monitor" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gnome-system-monitor_70.snap" (70)
Do      today at 10:58 BST  -                   Mount snap "gnome-system-monitor" (70)
Do      today at 10:58 BST  -                   Copy snap "gnome-system-monitor" data
Do      today at 10:58 BST  -                   Setup snap "gnome-system-monitor" (70) security profiles
Do      today at 10:58 BST  -                   Make snap "gnome-system-monitor" (70) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gnome-system-monitor"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gnome-system-monitor"
Do      today at 10:58 BST  -                   Setup snap "gnome-system-monitor" aliases
Do      today at 10:58 BST  -                   Run install hook of "gnome-system-monitor" snap if present
Do      today at 10:58 BST  -                   Start snap "gnome-system-monitor" (70) services
Do      today at 10:58 BST  -                   Run configure hook of "gnome-system-monitor" snap if present
Do      today at 10:58 BST  -                   Ensure prerequisites for "gtk-common-themes" are available
Do      today at 10:58 BST  -                   Prepare snap "/var/lib/snapd/seed/snaps/gtk-common-themes_1198.snap" (1198)
Do      today at 10:58 BST  -                   Mount snap "gtk-common-themes" (1198)
Do      today at 10:58 BST  -                   Copy snap "gtk-common-themes" data
Do      today at 10:58 BST  -                   Setup snap "gtk-common-themes" (1198) security profiles
Do      today at 10:58 BST  -                   Make snap "gtk-common-themes" (1198) available to the system
Do      today at 10:58 BST  -                   Automatically connect eligible plugs and slots of snap "gtk-common-themes"
Do      today at 10:58 BST  -                   Set automatic aliases for snap "gtk-common-themes"
Do      today at 10:58 BST  -                   Setup snap "gtk-common-themes" aliases
Do      today at 10:58 BST  -                   Run install hook of "gtk-common-themes" snap if present
Do      today at 10:58 BST  -                   Start snap "gtk-common-themes" (1198) services
Do      today at 10:58 BST  -                   Run configure hook of "gtk-common-themes" snap if present
Do      today at 10:58 BST  -                   Mark system seeded

......................................................................
Make snap "core" (6673) available to the system

2019-05-17T10:58:58+01:00 INFO Requested daemon restart.

......................................................................
Automatically connect eligible plugs and slots of snap "core"

2019-05-17T10:58:58+01:00 INFO Waiting for restart...

sudo systemctl status snapd.autoimport:

● snapd.autoimport.service - Auto import assertions from block devices
   Loaded: loaded (/lib/systemd/system/snapd.autoimport.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Fri 2019-05-17 16:31:20 BST; 33min ago
           └─ ConditionKernelCommandLine=snap_core was not met

Windows 详细信息:- Windows 10,版本 1809,(操作系统内部版本 17763.437)

我尝试过的事情

1 - 乱搞/var/lib/snapd/state.json

我在这里尝试了这个建议:https ://forum.snapcraft.io/t/cant-install-or-refresh-snaps-on-arch-linux/8690/28

看起来像这样:

sudo systemctl stop snapd
sudo cat /var/lib/snapd/state.json | \
    jq 'delpaths([["data", "auth", "device"]])' > state.json-new
sudo cp state.json-new /var/lib/snapd/state.json
sudo systemctl start snapd

但是(这可能是我是一个 Ubuntu 菜鸟)我无法jq安装,我不确定它到底在做什么,所以我不能手动安装。

2 - 使用 Ubuntu 19 映像

这显然有同样的问题。

3 - 一位同事尝试使用他的笔记本电脑

他有同样的问题

4 - 重新安装snapd

我运行了这个:sudo apt install --reinstall snapd只是为了让安装卡在 67%。

5 - 乱搞/var/lib/snapd/seed/seed.yaml

根据这个错误:https ://www.mail-archive.com/[email protected]/msg5400922.html

我尝试重新排序 gtk-common-themes 部分并删除 gnome-calculator 部分(每次更改后重新启动),这似乎没有任何区别。该snap tasks --last=seed命令仍然显示它卡在 gnome-calculator 任务上。

6 - 用头撞键盘

我感觉好多了,但问题仍然存在。

7 - 使用非快速启动图像

我下载了一个 Ubuntu 18.04.2 ISO 并使用了它。这有效(因为我可以安装 Visual Studio Code 并且 snap 命令看起来很健康)。然而,它没有所有漂亮的 hyper-v 东西,所以屏幕很糟糕,没有复制和粘贴,鼠标非常迟钝等等......

我可以安装各种位来使这个图像对 hyper-v 更友好,但我有一种感觉,我永远不会像官方的那样光滑。如果我能解决snap这个问题,我想我最终会得到最好的用户体验。

8 - 这有效。玩弄/var/lib/snapd/seed/seed.yaml第 2 部分

我从里面删除了一堆东西,/var/lib/snapd/seed/seed.yaml所以现在看起来像这样:

snaps:
  -
    name: core
    channel: stable
    file: core_6673.snap
  -
    name: gtk-common-themes
    channel: stable/ubuntu-18.04
    file: gtk-common-themes_1198.snap
  -
    name: gnome-3-26-1604
    channel: stable/ubuntu-18.04
    file: gnome-3-26-1604_82.snap

然后确实snap abort --last=seed紧随其后sudo systemctl restart snapd。检查snap tasks --last=seed- 它们都应该是完整的,您可以安装快照(例如 Visual Studio Code)。

比我聪明的人可能会指出这会导致可怕的副作用。

gnome hyper-v snap gnome-calculator
  • 1 个回答
  • 2793 Views
Martin Hope
Force Hero
Asked: 2017-01-14 06:23:31 +0800 CST

有没有办法在顶部统一栏中不断显示我的外部 IP 地址?

  • 10

所以我们的想法是让它始终位于屏幕的右上角。谢谢。

unity
  • 2 个回答
  • 2059 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve