Hugoエラー「cannot perform operation: mount ...: Permission denied」の解決法

Hugo実行→見慣れないエラー
いつもはTermux環境だが、久しぶりにLinux環境でサイト更新作業やるぞと、サイトをプレビューすべく次のコマンドで静的サイトジェネレータのHugoを動かしてみたら、見慣れないエラーが発生して出鼻をくじかれる。
$ env HUGO_ENV='DEV' hugo server --watch --buildDrafts=true --buildFuture=true --cacheDir=/tmp/hugo_cache/ cannot perform operation: mount --rbind /mnt /tmp/snap.rootfs_V1My5h//mnt: Permission denied
環境情報
エラー発生時の各種環境については次のとおり。
$ snap version snap 2.37.4+18.04.1 snapd 2.37.4+18.04.1 series 16 linuxmint 19 kernel 4.15.0-46-generic $ cat /etc/lsb-release DISTRIB_ID=LinuxMint DISTRIB_RELEASE=19 DISTRIB_CODENAME=tara DISTRIB_DESCRIPTION="Linux Mint 19 Tara" $ which hugo /snap/bin/hugo $ hugo version Hugo Static Site Generator v0.54.0 linux/amd64 BuildDate: 2019-02-01T13:33:06Z
エラーの解決法
Hugoはsnapでインストールしてあり、エラーメッセージに「/tmp/snap.rootfs_V1My5h」とあるから、snapに何か起因するエラーなのかなと考えながら、下記のサイトで案内されている解決策snap refresh --candidate core
を実行してみた。その結果、snapのバージョンが更新された状態に。
$ snap refresh --candidate core 2019-03-27T23:04:09+09:00 INFO Waiting for restart... core (candidate) 16-2.38 from Canonical✓ refreshed $ snap version snap 2.38 snapd 2.38 series 16 linuxmint 19 kernel 4.15.0-46-generic
Hugo実行→OK
そしてこの「snap 2.38」の状態だと、Hugoがエラーなく動作した。ほっと一安心である。
$ env HUGO_ENV='DEV' hugo server --watch --buildDrafts=true --buildFuture=true --cacheDir=/tmp/hugo_cache/ (中略) Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop