Repository navigation
Module packer.luarocks not found on mac osx 13.3 #1228
Copy link
Copy link
Open
Labels
Description
Activity
- addedv1An issue or PR relevant to packer v2An issue or PR relevant to packer v2
on Apr 10, 2023 Same problem here
- System Version:
macOS 12.6 (21G115) NVIM v0.9.0; Build type: Release; LuaJIT 2.1.0-beta3git version 2.39.2
Error detected while processing BufWritePost Autocommands for "plugins.lua": E5108: Error executing lua ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: module 'packer.luarocks' not found: no field package.preload['packer.luarocks'] cache_loader: module packer.luarocks not found cache_loader_lib: module packer.luarocks not found no file './packer/luarocks.lua' no file '/opt/homebrew/share/luajit-2.1.0-beta3/packer/luarocks.lua' no file '/usr/local/share/lua/5.1/packer/luarocks.lua' no file '/usr/local/share/lua/5.1/packer/luarocks/init.lua' no file '/opt/homebrew/share/lua/5.1/packer/luarocks.lua' no file '/opt/homebrew/share/lua/5.1/packer/luarocks/init.lua' no file './packer/luarocks.so' no file '/usr/local/lib/lua/5.1/packer/luarocks.so' no file '/opt/homebrew/lib/lua/5.1/packer/luarocks.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file './packer.so' no file '/usr/local/lib/lua/5.1/packer.so' no file '/opt/homebrew/lib/lua/5.1/packer.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: in function 'require_and_configure' ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:576: in function 'sync' [string ":lua"]:1: in main chunk- System Version:
The problem is that neovim actually sticks to
lua 5.1for different reasons.The error most likely happens due to
brew install luarocksbeing built withluanewer than5.1. Even if you havelua@5.1installed withbrew, installingluarockswith the mentioned command will install the newest version ofluaanyway.I worked around it by compiling
luarocksmanually withlua 5.1headers frombrew. This worked for me:$ brew install lua@5.1 $ curl -R -O https://luarocks.github.io/luarocks/releases/luarocks-3.9.2.tar.gz $ tar -zxf luarocks-3.9.2.tar.gz $ cd luarocks-3.9.2.tar.gz $ ./configure --with-lua-include="/opt/homebrew/Cellar/lua@5.1/5.1.5_8/include/lua5.1" $ make && make install $ ln -s /usr/local/share/lua /opt/homebrew/share/Reacted by Levi Ouwendijk
Unable to run
PackerSyncorPackerInstallcommands on mac.nvim --version: v0.9.0git --version: 2.39.2Steps to reproduce
Cloned repo to the right path
Used a simple
init.luausing the https://github.com/nvim-lua/kickstart.nvim.Created a simple
lua/directory and create a file namedinstaller.lua, paste packer configs.Content of
installer.luaFile structure of
~/.config/nvimActual behaviour