2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

neovim + packer の rocks オプションでインストールに失敗するときの対処

Last updated at Posted at 2023-07-18

備忘録

同じことでまた悩みたくない、またそういう人たちを見たくない...

ことの発端

私は macOS で neovim を使っています。

❯ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 13.4.1 (22F82)
      Kernel Version: Darwin 22.5.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: GoichiMacBook
      User Name: Goichi Iisaka (goichiiisaka)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 24 days, 21 hours, 46 minutes
❯ rtx list
deno   1.35.1  ~/.config/rtx/config.toml latest
go     1.20.6  ~/.config/rtx/config.toml latest
lua    5.4.6   ~/.config/rtx/config.toml latest
neovim 0.9.1   ~/.config/rtx/config.toml latest
node   20.4.0  ~/.config/rtx/config.toml latest
pdm    2.7.0
python 2.7.18  ~/.config/rtx/config.toml 2.7
python 3.8.17  ~/.config/rtx/config.toml 3.8
python 3.9.17  ~/.config/rtx/config.toml 3.9
python 3.10.12 ~/.config/rtx/config.toml 3.10
python 3.11.4  ~/.config/rtx/config.toml 3.11

neovim で jakewvincent/mkdnflow.nvim を使いたくて、
リポジトリのREADME.md にあるとおりに、

  use { "jakewvincent/mkdnflow.nvim",
    rocks = "luautf8", -- Ensures optional luautf8 dependency is installed
    config = function() require("mkdnflow").setup() end
  }

と書いて :PackerSync を実行すると変なエラーがでてしまいました。

packer.nvim] [ERROR 19:32:52] luarocks.lua:104: Failed to install hererocks: {
[packer.nvim]   exit_code = 1,
[packer.nvim]   signal = 0
[packer.nvim] }

プラグイン自体はインストールできるのですが、
エラーは消えない...

調べていくうちに LuaJIT の Issue764
にたどりつきました。
そもそもhererocks が失敗しているらしく、ビルドしなすと何事もなく通りようになりました。

❯ ls ~/.cache/nvim/packer_hererocks
2.1.0-beta3	hererocks.py

❯ export MACOSX_DEPLOYMENT_TARGET=13.4
❯ python3 ~/.cache/nvim/packer_hererocks/hererocks.py \
  --verbose -j 2.1.0-beta3 -r latest \
  ~/.cache/nvim/packer_hererocks/2.1.0-beta3

つまるところ、MACOSX_DEPLOYMENT_TARGET を設定しないといけない。
これは、難しいわ...

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?