You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to run PackerSync or PackerInstall commands on mac.
nvim --version: v0.9.0
git --version: 2.39.2
Operating system/version: M1 Pro Mac OS Ventura 13.3
Terminal name/version: iTerm2
Steps to reproduce
Cloned repo to the right path
│~/.config/nvim
└─> ls -lrt ~/.local/share/nvim/site/pack/packer/start/packer.nvim
total 120
-rw-r--r-- 1 user staff 710 Apr 10 15:33 Dockerfile
-rw-r--r-- 1 user staff 1069 Apr 10 15:33 LICENSE
-rw-r--r-- 1 user staff 328 Apr 10 15:33 Makefile
-rw-r--r-- 1 user staff 33128 Apr 10 15:33 README.md
drwxr-xr-x 3 user staff 96 Apr 10 15:33 doc
drwxr-xr-x 4 user staff 128 Apr 10 15:33 lua
-rw-r--r-- 1 user staff 10 Apr 10 15:33 selene.toml
-rw-r--r-- 1 user staff 100 Apr 10 15:33 stylua.toml
drwxr-xr-x 9 user staff 288 Apr 10 15:33 tests
-rw-r--r-- 1 user staff 610 Apr 10 15:33 vim.toml
Used a simple init.lua using the https://github.com/nvim-lua/kickstart.nvim.
Created a simple lua/ directory and create a file named installer.lua, paste packer configs.
Content of installer.lua
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
end)
E5108: Error executing lua ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: module 'packer.luarocks' not foun
d:
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:401: in function 'install'
[string ":lua"]:1: in main chunk
The text was updated successfully, but these errors were encountered:
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
The problem is that neovim actually sticks to lua 5.1 for different reasons.
The error most likely happens due to brew install luarocks being built with lua newer than 5.1. Even if you have lua@5.1 installed with brew, installing luarocks with the mentioned command will install the newest version of lua anyway.
I worked around it by compiling luarocksmanually with lua 5.1 headers from brew. 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/
Unable to run
PackerSync
orPackerInstall
commands on mac.nvim --version
: v0.9.0git --version
: 2.39.2Steps to reproduce
Cloned repo to the right path
Used a simple
init.lua
using 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.lua
File structure of
~/.config/nvim
Actual behaviour
The text was updated successfully, but these errors were encountered: