シュタゲのダルをリスペクトしています

Raspbianにneovimをインストールする

n年ぶりにラズピッピで作業する機会があったのですが、neovimのインストールに手間取ったので共有です

ubuntuだと下記のコマンドでインストールできます。

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim

がraspbianでは上手くいきません。

qiita.com

上の記事のようにraspbianのレポジトリではないのでadd-apt-repositoryをしようとするとエラーが発生します。
なので上の記事と同様にubuntu用のneovim PPAを登録します。

準備

公開鍵はこちらを参照してください

launchpad.net

公開鍵の登録をします

sudo apt install dirmngr
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9DBB0BE9366964F134855E2255F96FCF8231B6DD

レポジトリの設定

sudo touch /etc/apt/sources.list.d/neovim-ppa.list

ファイルの中は下記の通り

deb http://ppa.launchpad.net/neovim-ppa/stable/ubuntu YOUR_UBUNTU_VERSION_HERE main 
deb-src http://ppa.launchpad.net/neovim-ppa/stable/ubuntu YOUR_UBUNTU_VERSION_HERE main 

後はこのように

$sudo apt update
$sudo apt-get install neovim
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libjemalloc1 libluajit-5.1-2 libmsgpackc2 libtermkey1 libunibilium0 libvterm0 neovim-runtime
Suggested packages:
  ctags vim-scripts
Recommended packages:
  python-neovim python3-neovim
The following NEW packages will be installed:
  libjemalloc1 libluajit-5.1-2 libmsgpackc2 libtermkey1 libunibilium0 libvterm0 neovim neovim-runtime
0 upgraded, 8 newly installed, 0 to remove and 88 not upgraded.
Need to get 4729 kB of archives.
After this operation, 20.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ppa.launchpad.net/neovim-ppa/stable/ubuntu xenial/main armhf neovim-runtime all 0.3.1-3ppa1~ubuntu16.04.5 [3336 kB]
Get:2 http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian stretch/main armhf libluajit-5.1-2 armhf 2.0.4+dfsg-1 [171 kB]
Get:3 http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian stretch/main armhf libjemalloc1 armhf 3.6.0-9.1 [81.1 kB]
Get:4 http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian stretch/main armhf libmsgpackc2 armhf 1.4.2-4 [16.1 kB]
Get:5 http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian stretch/main armhf libunibilium0 armhf 1.2.0-1 [18.5 kB]
Get:6 http://ftp.tsukuba.wide.ad.jp/Linux/raspbian/raspbian stretch/main armhf libvterm0 armhf 0~bzr684-1 [23.3 kB]
Get:7 http://ppa.launchpad.net/neovim-ppa/stable/ubuntu xenial/main armhf libtermkey1 armhf 0.20-1ppa1~ubuntu16.04.2 [15.4 kB]
Get:8 http://ppa.launchpad.net/neovim-ppa/stable/ubuntu xenial/main armhf neovim armhf 0.3.1-3ppa1~ubuntu16.04.5 [1068 kB]
Fetched 4729 kB in 20s (235 kB/s)
apt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "en_US.UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package libluajit-5.1-2:armhf.
(Reading database ... 137685 files and directories currently installed.)
Preparing to unpack .../0-libluajit-5.1-2_2.0.4+dfsg-1_armhf.deb ...
Unpacking libluajit-5.1-2:armhf (2.0.4+dfsg-1) ...
Selecting previously unselected package neovim-runtime.
Preparing to unpack .../1-neovim-runtime_0.3.1-3ppa1~ubuntu16.04.5_all.deb ...
Unpacking neovim-runtime (0.3.1-3ppa1~ubuntu16.04.5) ...
Selecting previously unselected package libjemalloc1.
Preparing to unpack .../2-libjemalloc1_3.6.0-9.1_armhf.deb ...
Unpacking libjemalloc1 (3.6.0-9.1) ...
Selecting previously unselected package libmsgpackc2:armhf.
Preparing to unpack .../3-libmsgpackc2_1.4.2-4_armhf.deb ...
Unpacking libmsgpackc2:armhf (1.4.2-4) ...
Selecting previously unselected package libunibilium0:armhf.
Preparing to unpack .../4-libunibilium0_1.2.0-1_armhf.deb ...
Unpacking libunibilium0:armhf (1.2.0-1) ...
Selecting previously unselected package libtermkey1:armhf.
Preparing to unpack .../5-libtermkey1_0.20-1ppa1~ubuntu16.04.2_armhf.deb ...
Unpacking libtermkey1:armhf (0.20-1ppa1~ubuntu16.04.2) ...
Selecting previously unselected package libvterm0:armhf.
Preparing to unpack .../6-libvterm0_0~bzr684-1_armhf.deb ...
Unpacking libvterm0:armhf (0~bzr684-1) ...
Selecting previously unselected package neovim.
Preparing to unpack .../7-neovim_0.3.1-3ppa1~ubuntu16.04.5_armhf.deb ...
Unpacking neovim (0.3.1-3ppa1~ubuntu16.04.5) ...
Setting up libunibilium0:armhf (1.2.0-1) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for desktop-file-utils (0.23-1) ...
Setting up libjemalloc1 (3.6.0-9.1) ...
Setting up neovim-runtime (0.3.1-3ppa1~ubuntu16.04.5) ...
Setting up libtermkey1:armhf (0.20-1ppa1~ubuntu16.04.2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Setting up libvterm0:armhf (0~bzr684-1) ...
Setting up libluajit-5.1-2:armhf (2.0.4+dfsg-1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for gnome-menus (3.13.3-9) ...
Setting up libmsgpackc2:armhf (1.4.2-4) ...
Setting up neovim (0.3.1-3ppa1~ubuntu16.04.5) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...

以上で終了です 良いVimライフを〜