web-dev-qa-db-ja.com

14.04にsnapdをインストールすると失敗する

Host Europeがホストする14.04を実行している仮想サーバーがあります。 snapを使用してNextcloudをインストールしたい。ただし、snapdのインストールは失敗します。

$ Sudo apt install snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  cgroup-lite crda dmsetup grub-common grub-gfxpayload-lists grub-pc
  grub-pc-bin grub2-common iw libcryptsetup4 libdevmapper1.02.1 libfuse2
  libsystemd-journal0 linux-generic-lts-xenial linux-headers-4.4.0-112
  linux-headers-4.4.0-112-generic linux-headers-generic-lts-xenial
  linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic
  linux-image-generic-lts-xenial squashfs-tools systemd thermald
  wireless-regdb
Suggested packages:
  multiboot-doc grub-emu xorriso desktop-base console-setup Fuse fdutils
  linux-lts-xenial-tools systemd-ui
The following NEW packages will be installed:
  cgroup-lite crda dmsetup grub-common grub-gfxpayload-lists grub-pc
  grub-pc-bin grub2-common iw libcryptsetup4 libdevmapper1.02.1 libfuse2
  libsystemd-journal0 linux-generic-lts-xenial linux-headers-4.4.0-112
  linux-headers-4.4.0-112-generic linux-headers-generic-lts-xenial
  linux-image-4.4.0-112-generic linux-image-extra-4.4.0-112-generic
  linux-image-generic-lts-xenial snapd squashfs-tools systemd thermald
  wireless-regdb
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 85.7 MB of archives.
After this operation, 408 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main dmsetup AMD64 2:1.02.77-6ubuntu2 [37.6 kB]
Get:2 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main libdevmapper1.02.1 AMD64 2:1.02.77-6ubuntu2 [93.3 kB]
Get:3 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main libfuse2 AMD64 2.9.2-4ubuntu4.14.04.1 [87.4 kB]
Get:4 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main libsystemd-journal0 AMD64 204-5ubuntu20.26 [51.0 kB]
Get:5 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main wireless-regdb all 2013.02.13-1ubuntu1 [6456 B]
Get:6 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main crda AMD64 1.1.2-1ubuntu2 [15.2 kB]
Get:7 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/main grub-common AMD64 2.02~beta2-9ubuntu1.14 [1679 kB]
Get:8 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/main grub2-common AMD64 2.02~beta2-9ubuntu1.14 [501 kB]
Get:9 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/main grub-pc-bin AMD64 2.02~beta2-9ubuntu1.14 [882 kB]
Get:10 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/main grub-pc AMD64 2.02~beta2-9ubuntu1.14 [174 kB]
Get:11 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main grub-gfxpayload-lists AMD64 0.6 [3506 B]
Get:12 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main iw AMD64 3.4-1 [51.7 kB]
Get:13 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main libcryptsetup4 AMD64 2:1.6.1-1ubuntu1 [77.0 kB]
Get:14 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-image-4.4.0-112-generic AMD64 4.4.0-112.135~14.04.1 [20.9 MB]
Get:15 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-image-extra-4.4.0-112-generic AMD64 4.4.0-112.135~14.04.1 [35.7 MB]
Get:16 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-image-generic-lts-xenial AMD64 4.4.0.112.96 [2516 B]
Get:17 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-headers-4.4.0-112 all 4.4.0-112.135~14.04.1 [9923 kB]
Get:18 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-headers-4.4.0-112-generic AMD64 4.4.0-112.135~14.04.1 [773 kB]
Get:19 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-headers-generic-lts-xenial AMD64 4.4.0.112.96 [2486 B]
Get:20 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main linux-generic-lts-xenial AMD64 4.4.0.112.96 [1800 B]
Get:21 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty/main cgroup-lite all 1.9 [3918 B]
Get:22 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/main squashfs-tools AMD64 1:4.2+20130409-2ubuntu0.14.04.2 [90.6 kB]
Get:23 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-security/main systemd AMD64 204-5ubuntu20.26 [1425 kB]
Get:24 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/universe snapd AMD64 2.29.4.2~14.04 [13.0 MB]
Get:25 http://ftp.hosteurope.de/mirror/archive.ubuntu.com/ trusty-updates/main thermald AMD64 1.4.3-5~14.04.4 [202 kB]
Fetched 85.7 MB in 7s (11.4 MB/s)
Preconfiguring packages ...
Selecting previously unselected package dmsetup.
(Reading database ... 146702 files and directories currently installed.)
Preparing to unpack .../dmsetup_2%3a1.02.77-6ubuntu2_AMD64.deb ...
Unpacking dmsetup (2:1.02.77-6ubuntu2) ...
Selecting previously unselected package libdevmapper1.02.1:AMD64.
Preparing to unpack .../libdevmapper1.02.1_2%3a1.02.77-6ubuntu2_AMD64.deb ...
Unpacking libdevmapper1.02.1:AMD64 (2:1.02.77-6ubuntu2) ...
Selecting previously unselected package libfuse2:AMD64.
Preparing to unpack .../libfuse2_2.9.2-4ubuntu4.14.04.1_AMD64.deb ...
Unpacking libfuse2:AMD64 (2.9.2-4ubuntu4.14.04.1) ...
Selecting previously unselected package libsystemd-journal0:AMD64.
Preparing to unpack .../libsystemd-journal0_204-5ubuntu20.26_AMD64.deb ...
Unpacking libsystemd-journal0:AMD64 (204-5ubuntu20.26) ...
Selecting previously unselected package wireless-regdb.
Preparing to unpack .../wireless-regdb_2013.02.13-1ubuntu1_all.deb ...
Unpacking wireless-regdb (2013.02.13-1ubuntu1) ...
Selecting previously unselected package crda.
Preparing to unpack .../crda_1.1.2-1ubuntu2_AMD64.deb ...
Unpacking crda (1.1.2-1ubuntu2) ...
Selecting previously unselected package grub-common.
Preparing to unpack .../grub-common_2.02~beta2-9ubuntu1.14_AMD64.deb ...
Unpacking grub-common (2.02~beta2-9ubuntu1.14) ...
Selecting previously unselected package grub2-common.
Preparing to unpack .../grub2-common_2.02~beta2-9ubuntu1.14_AMD64.deb ...
Unpacking grub2-common (2.02~beta2-9ubuntu1.14) ...
Selecting previously unselected package grub-pc-bin.
Preparing to unpack .../grub-pc-bin_2.02~beta2-9ubuntu1.14_AMD64.deb ...
Unpacking grub-pc-bin (2.02~beta2-9ubuntu1.14) ...
Selecting previously unselected package grub-pc.
Preparing to unpack .../grub-pc_2.02~beta2-9ubuntu1.14_AMD64.deb ...
Unpacking grub-pc (2.02~beta2-9ubuntu1.14) ...
Selecting previously unselected package grub-gfxpayload-lists.
Preparing to unpack .../grub-gfxpayload-lists_0.6_AMD64.deb ...
Unpacking grub-gfxpayload-lists (0.6) ...
Selecting previously unselected package iw.
Preparing to unpack .../archives/iw_3.4-1_AMD64.deb ...
Unpacking iw (3.4-1) ...
Selecting previously unselected package libcryptsetup4.
Preparing to unpack .../libcryptsetup4_2%3a1.6.1-1ubuntu1_AMD64.deb ...
Unpacking libcryptsetup4 (2:1.6.1-1ubuntu1) ...
Selecting previously unselected package linux-image-4.4.0-112-generic.
Preparing to unpack .../linux-image-4.4.0-112-generic_4.4.0-112.135~14.04.1_AMD64.deb ...
Done.
Unpacking linux-image-4.4.0-112-generic (4.4.0-112.135~14.04.1) ...
Selecting previously unselected package linux-image-extra-4.4.0-112-generic.
Preparing to unpack .../linux-image-extra-4.4.0-112-generic_4.4.0-112.135~14.04.1_AMD64.deb ...
Unpacking linux-image-extra-4.4.0-112-generic (4.4.0-112.135~14.04.1) ...
Selecting previously unselected package linux-image-generic-lts-xenial.
Preparing to unpack .../linux-image-generic-lts-xenial_4.4.0.112.96_AMD64.deb ...
Unpacking linux-image-generic-lts-xenial (4.4.0.112.96) ...
Selecting previously unselected package linux-headers-4.4.0-112.
Preparing to unpack .../linux-headers-4.4.0-112_4.4.0-112.135~14.04.1_all.deb ...
Unpacking linux-headers-4.4.0-112 (4.4.0-112.135~14.04.1) ...
Selecting previously unselected package linux-headers-4.4.0-112-generic.
Preparing to unpack .../linux-headers-4.4.0-112-generic_4.4.0-112.135~14.04.1_AMD64.deb ...
Unpacking linux-headers-4.4.0-112-generic (4.4.0-112.135~14.04.1) ...
Selecting previously unselected package linux-headers-generic-lts-xenial.
Preparing to unpack .../linux-headers-generic-lts-xenial_4.4.0.112.96_AMD64.deb ...
Unpacking linux-headers-generic-lts-xenial (4.4.0.112.96) ...
Selecting previously unselected package linux-generic-lts-xenial.
Preparing to unpack .../linux-generic-lts-xenial_4.4.0.112.96_AMD64.deb ...
Unpacking linux-generic-lts-xenial (4.4.0.112.96) ...
Selecting previously unselected package cgroup-lite.
Preparing to unpack .../cgroup-lite_1.9_all.deb ...
Unpacking cgroup-lite (1.9) ...
Selecting previously unselected package squashfs-tools.
Preparing to unpack .../squashfs-tools_1%3a4.2+20130409-2ubuntu0.14.04.2_AMD64.deb ...
Unpacking squashfs-tools (1:4.2+20130409-2ubuntu0.14.04.2) ...
Selecting previously unselected package systemd.
Preparing to unpack .../systemd_204-5ubuntu20.26_AMD64.deb ...
Unpacking systemd (204-5ubuntu20.26) ...
Selecting previously unselected package snapd.
Preparing to unpack .../snapd_2.29.4.2~14.04_AMD64.deb ...
Unpacking snapd (2.29.4.2~14.04) ...
Selecting previously unselected package thermald.
Preparing to unpack .../thermald_1.4.3-5~14.04.4_AMD64.deb ...
Unpacking thermald (1.4.3-5~14.04.4) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for install-info (5.2.0.dfsg.1-2) ...
Setting up libfuse2:AMD64 (2.9.2-4ubuntu4.14.04.1) ...
Setting up libsystemd-journal0:AMD64 (204-5ubuntu20.26) ...
Setting up wireless-regdb (2013.02.13-1ubuntu1) ...
Setting up crda (1.1.2-1ubuntu2) ...
Setting up iw (3.4-1) ...
Setting up linux-image-4.4.0-112-generic (4.4.0-112.135~14.04.1) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-112-generic /boot/vmlinuz-4.4.0-112-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-112-generic
E: /usr/share/initramfs-tools/hooks/fixrtc failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-112-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-112-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-112-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-112-generic:
 linux-image-extra-4.4.0-112-generic depends on linux-image-4.4.0-112-generic; however:
  Package linux-image-4.4.0-112-generic is not configured yet.

dpkg: error processing package linux-image-extra-4.4.0-112-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic-lts-xenial:
 linux-image-generic-lts-xenial depends on linux-image-4.4.0-112-generic; however:
  Package linux-image-4.4.0-112-generic is not configured yet.
 linux-image-generic-lts-xenial depends on linux-image-extra-4.4.0-112-generic; however:
  Package linux-image-extra-4.4.0-112-generic is not configured yet.

dpkg: error processing package linux-image-generic-lts-xenial (--configure):
 dependency problems - leaving unconfigured
Setting up linux-headers-4.4.0-112 (4.4.0-112.135~14.04.1) ...
Setting up linux-headers-4.4.0-112-generic (4.4.0-112.135~14.04.1) ...
Setting up linux-headers-generic-lts-xenial (4.4.0.112.96) ...
dpkg: dependency problems prevent configuration of linux-generic-lts-xenial:
 linux-generic-lts-xenial depends on linux-image-generic-lts-xenial (= 4.4.0.112.96); however:
  Package linux-image-generic-lts-xenial is not configured yet.

dpkg: error processing package linux-generic-lts-xenial (--configure):
 dependency problems - leaving unconfigured
Setting up cgroup-lite (1.9) ...
cgroup-lite start/running
Setting up squashfs-tools (1:4.2+20130409-2ubuntu0.14.04.2) ...
dpkg: dependency problems prevent configuration of snapd:
 snapd depends on linux-generic-lts-xenial; however:
  Package linux-generic-lts-xenial is not configured yet.

dpkg: error processing package snapd (--configure):
 dependency problems - leaving unconfigured
Setting up thermald (1.4.3-5~14.04.4) ...
thermald start/running, process 10038
Setting up libdevmapper1.02.1:AMD64 (2:1.02.77-6ubuntu2) ...
Setting up grub-common (2.02~beta2-9ubuntu1.14) ...
Setting up grub2-common (2.02~beta2-9ubuntu1.14) ...
Setting up grub-pc-bin (2.02~beta2-9ubuntu1.14) ...
Setting up grub-pc (2.02~beta2-9ubuntu1.14) ...
Setting up grub-gfxpayload-lists (0.6) ...
Setting up libcryptsetup4 (2:1.6.1-1ubuntu1) ...
Setting up systemd (204-5ubuntu20.26) ...
systemd start/running, process 10241
Setting up dmsetup (2:1.02.77-6ubuntu2) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for libc-bin (2.19-0ubuntu6.14) ...
Processing triggers for initramfs-tools (0.103ubuntu4.10) ...
Errors were encountered while processing:
 linux-image-4.4.0-112-generic
 linux-image-extra-4.4.0-112-generic
 linux-image-generic-lts-xenial
 linux-generic-lts-xenial
 snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

snapを実行しようとすると、エラーが発生します。

 $ Sudo snap install hello-world
 error: cannot communicate with server: Post http://localhost/v2/snaps/hello-world: dial unix /run/snapd.socket: connect: no such file or directory

以前にsnapdをインストールしようとしました。インストール手順の最後にリストされているパッケージ

Errors were encountered while processing:
 linux-image-4.4.0-112-generic
 linux-image-extra-4.4.0-112-generic
 linux-image-generic-lts-xenial
 linux-generic-lts-xenial
 snapd

Sudo apt upgrade -fおよびSudo dpkg --configure -aを実行しようとするすべての試行が失敗します。これらのパッケージを削除するには、Sudo dpkg --purge --force-remove-reinstreq PACKAGE_NAMEを使用する必要がありました。それでも、linux-image-extra-4.4.0-112-genericを取り除くことができなかったため、/var/lib/dpkg/statusから手動で削除する必要がありました。

私が現在実行しているカーネル:

$ uname -r
3.13.0-042stab127.2
1
sfat

ホスティング会社から、ホストされている仮想サーバーでsnapdを使用することは、使用されているコンテナ仮想化のため不可能であると言われました。仮想サーバーのコンテナは、ホストシステムのカーネルを共有します。したがって、カーネルのアップグレードまたは別のカーネルの使用はできません。

0
sfat

リブートするだけです。新しいカーネル(snapdの前提条件)を入手しましたが、まだ実行していません。再起動後、すべてが正常に動作するはずです。

0