Help us understand the problem. What is going on with this article?

neovimのbrew upgradeでerror吐いたのでとりあえずの解決

More than 1 year has passed since last update.

neovimのbrew upgradeではまる

初めてbrew upgradeをしたところ、neovimでエラーを吐いたのでとりあえずの解決策。
以下、解決までの流れです。

brew upgradeをすると、

==> Installing neovim --HEAD
Error: An exception occurred within a child process:
  RuntimeError: /usr/local/opt/luarocks not present or broken
Please reinstall luarocks. Sorry :(

言われるがままにluarocksを別途インストール。

$ brew install luarocks
==> Installing dependencies for luarocks: lua
==> Installing luarocks dependency: lua
==> Downloading https://homebrew.bintray.com/bottles/lua-5.3.5_1.el_capitan.bott
######################################################################## 100.0%
...
==> Summary
🍺  /usr/local/Cellar/luarocks/3.0.1: 99 files, 595.2KB
==> Caveats
==> lua
You may also want luarocks:
  brew install luarocks
==> luarocks
LuaRocks supports multiple versions of Lua. By default it is configured
to use Lua5.3, but you can require it to use another version at runtime
with the `--lua-dir` flag, like this:

  luarocks --lua-dir=/usr/local/opt/lua@5.1 install say

無事インストールできたようなので再度upgrade。

$ brew upgrade neovim
==> Upgrading 1 outdated package:
neovim HEAD-10c3b20
==> Upgrading neovim
==> Cloning https://github.com/neovim/neovim.git
...
==> Downloading https://luarocks.org/luabitop-1.0.2-1.src.rock

curl: (22) The requested URL returned error: 404 Not Found
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "neovim--luabitop"
Download failed: https://luarocks.org/luabitop-1.0.2-1.src.rock

どうやら読み込もうとしているURLが404なので、エラーで検索してみるとissueを発見。

https://github.com/Homebrew/homebrew-core/issues/32231
このissueの中でのリンク先、
https://github.com/Homebrew/homebrew-core/issues/32144
を見る。

issueに書いてあるコマンドをコピペしてインストール

とりあえず下の方のコメントにあった
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/71820bed2565c7d65159ee29e5d4784cf436d73f/Formula/neovim.rb --HEAD

を試す。

$ brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/71820bed2565c7d65159ee29e5d4784cf436d73f/Formula/neovim.rb --HEAD
######################################################################## 100.0%
==> Reinstalling neovim
...
==> make install
🍺  /usr/local/Cellar/neovim/HEAD-edcf640: 1,380 files, 18.6MB, built in 4 minutes 11 seconds

エラーを吐かずにインストールできました。
とりあえずは問題なく動いています。見た感じ暫定版?
一応参考までに。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした