Ubuntu 20.04にemacsをインストール


このエントリーをはてなブックマークに追加

WSL2上のUbuntu 20.04にemacsをインストールしようとして

$ sudo apt install emacs

としたところインストールできませんでした(エラーメッセージは記録し忘れました)。

お決まりの

$ sudo apt update
$ sudo apt upgrade

したあともう一度最初のコマンドを打てばインストールできました。ただし、バージョンは26.3でやや古いです(現時点で最新は27.2)。

その際のログを載せておきます。

$ sudo apt install emacs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core emacs-bin-common emacs-common emacs-el emacs-gtk emacsen-common fontconfig
  fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts gtk-update-icon-cache hicolor-icon-theme
  humanity-icon-theme imagemagick-6-common libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0
  libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2 libcairo2 libcolord2 libcups2 libdatrie1
  libepoxy0 libfftw3-double3 libgd3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgomp1
  libgraphite2-3 libgs9 libgs9-common libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libidn11 libijs-0.35
  libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 liblcms2-2 liblqr-1-0 libm17n-0 libmagickcore-6.q16-6
  libmagickwand-6.q16-6 libopenjp2-7 libotf0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils
  libpaper1 libpixman-1-0 librest-0.7-0 librsvg2-2 librsvg2-common libsoup-gnome2.4-1 libthai-data libthai0 libtiff5
  libwayland-cursor0 libwayland-egl1 libwebp6 libwebpmux3 libxcb-render0 libxcursor1 libxkbcommon0 m17n-db
  poppler-data ubuntu-mono
Suggested packages:
  mailutils emacs-common-non-dfsg fonts-noto fonts-freefont-otf | fonts-freefont-ttf fonts-texgyre ghostscript-x
  colord cups-common libfftw3-bin libfftw3-dev libgd-tools gvfs liblcms2-utils m17n-docs libmagickcore-6.q16-6-extra
  librsvg2-bin poppler-utils fonts-japanese-mincho | fonts-ipafont-mincho fonts-japanese-gothic | fonts-ipafont-gothic
  fonts-arphic-ukai fonts-arphic-uming fonts-nanum
The following NEW packages will be installed:
  adwaita-icon-theme at-spi2-core emacs emacs-bin-common emacs-common emacs-el emacs-gtk emacsen-common fontconfig
  fonts-droid-fallback fonts-noto-mono fonts-urw-base35 ghostscript gsfonts gtk-update-icon-cache hicolor-icon-theme
  humanity-icon-theme imagemagick-6-common libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0
  libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2 libcairo2 libcolord2 libcups2 libdatrie1
  libepoxy0 libfftw3-double3 libgd3 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgif7 libgomp1
  libgraphite2-3 libgs9 libgs9-common libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libidn11 libijs-0.35
  libjbig0 libjbig2dec0 libjpeg-turbo8 libjpeg8 liblcms2-2 liblqr-1-0 libm17n-0 libmagickcore-6.q16-6
  libmagickwand-6.q16-6 libopenjp2-7 libotf0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpaper-utils
  libpaper1 libpixman-1-0 librest-0.7-0 librsvg2-2 librsvg2-common libsoup-gnome2.4-1 libthai-data libthai0 libtiff5
  libwayland-cursor0 libwayland-egl1 libwebp6 libwebpmux3 libxcb-render0 libxcursor1 libxkbcommon0 m17n-db
  poppler-data ubuntu-mono
0 upgraded, 81 newly installed, 0 to remove and 0 not upgraded.
Need to get 67.2 MB of archives.
After this operation, 273 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(以下略)

ちなみに、snapを使ってemacsをインストールする方法も本来は存在するのですが、WSL2上のUbuntu 20.04では以下のようにエラーが出ました。

$ sudo snap install emacs --classic
Interacting with snapd is not yet supported on Windows Subsystem for Linux.
This command has been left available for documentation purposes only.