Packer命令无法运行:找不到packer.luarocks等相关模块
Packer命令失效问题
之前PackerSync命令运行完全正常,未修改任何可能导致该命令失效的配置。
执行PackerSync时的错误
错误信息:module 'packer.luarocks' not found:
完整堆栈跟踪
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 '/Users/younes/neovim/.deps/usr/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 '/Users/younes/neovim/.deps/usr/share/lua/5.1/packer/luarocks.lua' no file '/Users/younes/neovim/.deps/usr/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 '/Users/younes/neovim/.deps/usr/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 '/Users/younes/neovim/.deps/usr/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
相关检查与其他异常
- 检查
packer.lua文件未发现异常,该文件仅配置并调用luarocks,无特殊内容。 - 出现luarocks相关警告:
- WARNING luarocks: not available -ADVICE: -spawn: luarocks failed with exit code - and signal -. luarocks is not executable
- 所有Packer命令均无法运行,执行
PackerStatus时提示错误:E5108: Error executing lua ...e/nvim/site/pack/packer/start/packer.nvim/lua/packer.lua:110: module 'packer.display' not found - 尚未找到任何解决方案或遇到相同问题的用户
- 通过Packer安装的VS Code配色主题插件可正常使用
- 尝试卸载并重装Packer,执行
PackerSync时看似已下载插件,但再次执行命令时仍出现相同问题
内容的提问来源于stack exchange,提问作者younes alaoui
相关产品推荐
相关产品推荐

