|
hammerspoon不正常工作解决办法
报错如下
- tack traceback:
- /Users/xxxx/.hammerspoon/wifi.lua:13: in main chunk
- [C]: in function 'rawrequire'
- ...app/Contents/Resources/extensions/hs/_coresetup/init.lua:657: in function 'require'
- /Users/xxxxx/.hammerspoon/init.lua:17: in main chunk
- [C]: in function 'xpcall'
- ...app/Contents/Resources/extensions/hs/_coresetup/init.lua:718: in function 'hs._coresetup.setup'
- (...tail calls...)
复制代码 输入命令
- luarocks --lua-version 5.4
复制代码 如果返回信息如果system和user都ok,就无需要重建luarocks
新建. luarocks
- mkdir .luarocks && cd .luarocks
复制代码 再新建文件config-5.4.lua
- lua_version = "5.4"
- lua_interpreter = "lua"
- rocks_trees = {
- {
- name = "user",
- root = "/Users/<username>/.luarocks"
- },
- }
- variables = {
- LUA_DIR = "/Users/<username>/customlua"
- }
复制代码 username改成自己的
输入命令测试是否解决
- luarocks --lua-version 5.4
复制代码
output
- Configuration files:
- System : /usr/local/etc/luarocks/config-5.4.lua (ok)
- User : /Users/xx/.luarocks/config-5.4.lua (ok)
复制代码 sytem和user都ok说明已经处理好
|
|