![很棒的 WM - 运行 lua rc.lua 会出现错误](https://linux22.com/image/1116756/%E5%BE%88%E6%A3%92%E7%9A%84%20WM%20-%20%E8%BF%90%E8%A1%8C%20lua%20rc.lua%20%E4%BC%9A%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF.png)
我使用 sudo apt-get install awesome 安装 awesome
我将 rc.lua 复制到 ~/.config/awesome 并运行
lua rc.lua
我收到以下错误:
lua: rc.lua:2: module 'awful' not found:
no field package.preload['awful']
no file '/usr/local/share/lua/5.2/awful.lua'
no file '/usr/local/share/lua/5.2/awful/init.lua'
no file '/usr/local/lib/lua/5.2/awful.lua'
no file '/usr/local/lib/lua/5.2/awful/init.lua'
no file './awful.lua'
no file '/usr/share/lua/5.2/awful.lua'
no file '/usr/share/lua/5.2/awful/init.lua'
no file './awful.lua'
no file '/usr/local/lib/lua/5.2/awful.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.2/awful.so'
no file '/usr/lib/lua/5.2/awful.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './awful.so'
stack traceback:
[C]: in function 'require'
rc.lua:2: in main chunk
[C]: in ?
我正在使用 ubuntu 12.04。我不确定我做错了什么或缺少了什么。请帮忙。
答案1
你想做什么?你实际上并不想直接通过 lua 解释器运行 rc.lua。
如果你想检查你的 rc.lua 的语法是否正确,那么使用awesome -k -c ~/.config/rc.lua
。错误