LoginSignup
1
2

More than 5 years have passed since last update.

neovimのインストール

Last updated at Posted at 2019-02-20

社内で配布されたvagrantのboxファイルから環境構築を行うときに
vim入れなおさないと・・・
となったため、手順を忘れないためにもメモしておきます

cloneする

git clone https://github.com/neovim/neovim.git

make(1回目)

makeを実行する

cd neovim
make

と、出ましたエラー。

error
/bin/sh: line 1: cmake: command not found

なので

yum install cmake

make(2回目)

make

67%まで行ったけどエラー・・・

error
Could not find an 'unzip' program. Tried: unzip.
yum install unzip

make(3回目)

make

いけた!!!!!

インストール

make install

確認

nvim

開けた!バージョン0.4!(知らんうちに0.4が出てて余計嬉しい)

だがしかしbut、pythonは認識していない。

:echo has('python3')

pythonのインストール

python --version
#=> Python 2.7.5
which python3
#=> 無し
cd /usr/bin
ls python*
text
lrwxrwxrwx  1 root root      9 Aug 17  2018 python -> python2.7
lrwxrwxrwx  1 root root      9 Aug 17  2018 python2 -> python2.7
-rwxr-xr-x  1 root root   7216 Jul 13  2018 python2.7
yum install python36
ls python*
text
lrwxrwxrwx 1 root root     9 Feb 20 10:34 python -> python2.7
lrwxrwxrwx 1 root root     9 Aug 17  2018 python2 -> python2.7
-rwxr-xr-x 1 root root  7216 Jul 13  2018 python2.7
lrwxrwxrwx 1 root root    18 Feb 20 10:12 python36 -> /usr/bin/python3.6
-rwxr-xr-x 2 root root 11408 Jan 27 01:55 python3.6
-rwxr-xr-x 2 root root 11408 Jan 27 01:55 python3.6m
ln -s python3.6 python3

pipのインストール

yum search pip
yum install python36-pip
ln -s pip3.6 pip3

これでpip3が入った。

nvimを開き:checkhealthを実行すると設定手順が書いてある

text
## Python 3 provider (optional)
  - INFO: Disabled (g:loaded_python3_provider=1).  This might be due to some previous error.
  - INFO: Using: g:python3_host_prog = "/usr/bin/python3"
  - ERROR: "/usr/bin/python3" was not found.
  - INFO: Executable: Not found
  - ERROR: Detected pip upgrade failure: Python executable can import "pynvim" but not "neovim": /usr/bin/python3
    - ADVICE:
      - Use that Python version to reinstall "pynvim" and optionally "neovim".
          pip3 uninstall pynvim neovim
          pip3 install pynvim
          pip3 install neovim  # only if needed by third-party software

pip3でのuninstallが手順1のため試してみる。とエラー
バージョンがどうたら・・・でupgradeしろと。

pip3 install --upgrade pip

すると/usr/binからpip3が消えて、/usr/local/binにpip3が、、、
よくわからないが存在はするのでokとしてそのまま進めてみる

pynvimのインストール

pip3 install pynvim
pip3 install neovim

確認

nvimにて

:echo has('python3')
#=> 1
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2