ADCH++ 2.x: LUA errors when running under Linux

Created by Toast
Keywords:
Last updated by:
Toast

This FAQ will try and help you if your getting errors under linux

If you start your adchpp deamon and get this error that "luadchpp" is not found and no lua files are loading

Example:

2009-02-25 21:36:04: SocketManager: Starting
2009-02-25 21:36:04: ScriptManager: Starting
2009-02-25 21:36:04: LuaScript: Error loading file: access.lua:8: module 'luadchpp' not found:
        no field package.preload['luadchpp']
        no file './luadchpp.lua'
        no file '/usr/local/share/lua/5.1/luadchpp.lua'
        no file '/usr/local/share/lua/5.1/luadchpp/init.lua'
        no file '/usr/local/lib/lua/5.1/luadchpp.lua'
        no file '/usr/local/lib/lua/5.1/luadchpp/init.lua'
        no file './luadchpp.so'
        no file '/usr/local/lib/lua/5.1/luadchpp.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file 'luadchpp.so'
2009-02-25 21:36:04: PluginManager: Script.so loaded
2009-02-25 21:36:04: BloomManager: Starting
2009-02-25 21:36:04: PluginManager: Bloom.so loaded
2009-02-25 21:36:04: adchpp: ADCH++ v2.2.0 (r0) Debug started as a daemon

Possible solutions follows below

Solution 1:
First solution is to use absolute paths to the script folder

example:
home/testuser/adchpp/scripts/

Solution 2:
This one is installing lua and making dirs for the scripts

example:

DEB Based Systems: sudo apt-get install lua5.1 liblua5.1-0
RPM Based Systems: yum install lua lua-devel

mkdir -p /usr/local/lib/lua/5.1
cp /path-to-the-adch++-dir/adchpp/build/debug-default/bin/luadchpp.so /usr/local/lib/lua/5.1/
export LUA_PATH='/path-to-the-adch++-dir/adchpp/build/debug-default/bin/Scripts/?.lua'