Comments (11)
Hey it is not directly the bouncer, some reason the dependency lua_cjson is failing to compile cause it cant find the file
Could you run sudo find / -name "lua.h"
from cs-nginx-bouncer.
sudo find / -name "lua.h"
/usr/include/lua5.2/lua.h
So install script is looking for lua.h in /usr/include/lua5.1!
from cs-nginx-bouncer.
sudo apt install lua5.2 seems to solve this issue. However sudo nginx -t gives
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [error] init_by_lua error: /usr/lib/crowdsec/lua/plugins/crowdsec/iputils.lua:22: module 'ffi' not found:
no field package.preload['ffi']
no file '/usr/lib/crowdsec/lua/ffi.lua'
no file './ffi.lua'
no file '/usr/local/share/lua/5.1/ffi.lua'
no file '/usr/local/share/lua/5.1/ffi/init.lua'
no file '/usr/local/lib/lua/5.1/ffi.lua'
no file '/usr/local/lib/lua/5.1/ffi/init.lua'
no file '/usr/share/lua/5.1/ffi.lua'
no file '/usr/share/lua/5.1/ffi/init.lua'
no file './ffi.lua'
no file './ffi.so'
no file '/usr/local/lib/lua/5.1/ffi.so'
no file '/usr/lib/aarch64-linux-gnu/lua/5.1/ffi.so'
no file '/usr/lib/lua/5.1/ffi.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/lib/crowdsec/lua/plugins/crowdsec/iputils.lua:22: in main chunk
[C]: in function 'require'
/usr/lib/crowdsec/lua/crowdsec.lua:4: in main chunk
[C]: in function 'require'
init_by_lua:2: in main chunk
nginx: configuration file /etc/nginx/nginx.conf test failed
from cs-nginx-bouncer.
Starting from here: https://stackoverflow.com/questions/74914141/cannot-install-ffi-library-for-lua-luajit
I bypass the problen this way:
git clone https://github.com/facebookarchive/luaffifb
cd luaffifb
luarocks make
chmod '0755' '/usr/local/lib/lua/5.1/ffi.so'
after that nginx stop complaining...
Hope this helps...
from cs-nginx-bouncer.
sudo luarocks make
gcc -O2 -fPIC -I/usr/include/lua5.1 -c call.c -o call.o -Idynasm
In file included from call.c:9:
ffi.h:30:11: fatal error: lua.h: Aucun fichier ou dossier de ce type
30 | # include <lua.h>
| ^~~~~~~
compilation terminated.
Error: Build error: Failed compiling object call.o
from cs-nginx-bouncer.
Have you tried sudo apt install libffi-dev?
Maybe you're missing /usr/include/lua5.x/lua.h...
from cs-nginx-bouncer.
Sorry, the correct package is liblua5.x-dev not libffi-dev.. My bad...😏
from cs-nginx-bouncer.
Thanks for you help!
I have to install first liblua5.1-0.dev and then install luaffifb as suggested
But nginx -t throws
nginx: [error] [lua] crowdsec.lua:46: init(): error loading recaptcha plugin: no recaptcha site key provided, can't use recaptcha
from cs-nginx-bouncer.
Ok. I can disable recaptcha temporaly and look at its configuration...
from cs-nginx-bouncer.
Check this https://github.com/crowdsecurity/lua-cs-bouncer
git clone https://github.com/crowdsecurity/lua-cs-bouncer.git
Read the README.md, I had to install manually, but seems to do the trick...
from cs-nginx-bouncer.
Check this https://github.com/crowdsecurity/lua-cs-bouncer
git clone https://github.com/crowdsecurity/lua-cs-bouncer.git Read the README.md, I had to install manually, but seems to do the trick...
You mean installing lua-cs-bouncer will fix nginx error? I can't disable recapcha plugin.
from cs-nginx-bouncer.
Related Issues (20)
- Docker image HOT 2
- Lua mod directory not found HOT 1
- Update sources before dependency installation
- No license? HOT 2
- APT installation broken when using Nginx's APT repository. HOT 3
- Bug/ crowdsec-nginx-bouncer: is looking for lua 5.1 files instead 5.3 HOT 5
- Plesk panel configration files messged up after installing crowdsec-nginx-bouncer HOT 3
- No Ubuntu 22 (Jammy) support HOT 2
- crowdsec-nginx-bouncer conflict with nginx-common HOT 3
- can't return 403 HOT 6
- Unable to locate package crowdsec-nginx-bouncer HOT 1
- Documentation needs to be updated to include other captcha methods HOT 1
- Lua runtime error: no request found HOT 1
- CentOS/Almalinux 8 support HOT 1
- certbot nginx plugin does not support lua HOT 3
- Error install crowdsec-nginx-bouncer HOT 4
- Nginx Error - Module 'resty.string' not found HOT 5
- [deps] Pin version via install.sh
- Unable to install nginx bouncer HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs-nginx-bouncer.