Open Rat-S opened 7 years ago
lua-cjson is not in the Fedora package archives for some reason. I installed the library using luarocks and it seems to wor OK. I'm getting a lot of CPU usage for some reason though.
Yup same here
sudo dnf install lua-devel.$(uname -p) luarocks
sudo luarocks install lua-cjson
That should fix the problem
You might need to download cjson and have it compile for lua5.3. On FreeBSD, I had to do this, but it's a very simple install. https://github.com/mpx/lua-cjson/blob/master/Makefile
I get the exact same error if I build weechat with the suggested liblua5.3-dev
as listed here: https://weechat.org/files/doc/stable/weechat_user.en.html#dependencies. If I remove liblua5.3-dev
, install liblua5.1-0-dev
and rebuild weechat, the plugin succeeds.
Same issue on Ubuntu 17.4
WeeChat 1.7 (C) 2003-2017 - https://weechat.org/
10:23:13 | ___ __ ______________ _____
10:23:13 | __ | / /___________ ____/__ /_______ __ /_
10:23:13 | __ | /| / /_ _ \ _ \ / __ __ \ __ `/ __/
10:23:13 | __ |/ |/ / / __/ __/ /___ _ / / / /_/ // /_
10:23:13 | ____/|__/ \___/\___/\____/ /_/ /_/\__,_/ \__/
10:23:13 | WeeChat 1.7 [compiled on Apr 26 2017 18:10:49]
10:23:13 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
10:23:13 =!= | lua: unable to execute file "/home/user/.weechat/lua/autoload/matrix.lua"
10:23:13 =!= | lua: error: /home/user/.weechat/lua/autoload/matrix.lua:46: module 'cjson' not found:
10:23:13 | no field package.preload['cjson']
10:23:13 | no file './cjson.lua'
10:23:13 | no file '/usr/local/share/lua/5.1/cjson.lua'
10:23:13 | no file '/usr/local/share/lua/5.1/cjson/init.lua'
10:23:13 | no file '/usr/local/lib/lua/5.1/cjson.lua'
10:23:13 | no file '/usr/local/lib/lua/5.1/cjson/init.lua'
10:23:13 | no file '/usr/share/lua/5.1/cjson.lua'
10:23:13 | no file '/usr/share/lua/5.1/cjson/init.lua'
10:23:13 | no file './cjson.so'
10:23:13 | no file '/usr/local/lib/lua/5.1/cjson.so'
10:23:13 | no file '/usr/lib/x86_64-linux-gnu/lua/5.1/cjson.so'
10:23:13 | no file '/usr/lib/lua/5.1/cjson.so'
10:23:13 | no file '/usr/local/lib/lua/5.1/loadall.so'
10:23:13 | Plugins loaded: alias, aspell, charset, exec, fifo, guile, irc, javascript, logger, lua, perl, python, relay, ruby, script, tcl, trigger, xfer
Edit, installing lua-cjson-dev fixed this. needs documentation :)
Same issue on Arch. lua-cjson isn't part of the lua package.
@picardoJ's comment also works for Fedora 26, despite it installs a package for f25
. It was not neccessary for me to install the lua-devel
package.
Same issue on OS X. No packages available in homebrew. :-/
Guys, there is a README:
brew install lua
luarocks install lua-cjson
brew install weechat --with-lua
Terribly sorry, did not read the entire readme, only the generic instructions. :-/
Hello, I have weechat v 1.6 and Lua 5.3.4 on fedora 25. When I attempt to run the matrix lua script, I get the error as
But I have installed lua-cjson already.
Any help would be appreciated. Thanks.