kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
528 stars 84 forks source link

luarocks --local installation is not working #234

Open aellwein opened 9 years ago

aellwein commented 9 years ago

When i am trying a user-only installation of turbo, it fails as it tries to install files under /usr/...:


$ luarocks install turbo --local
Installing https://luarocks.org/turbo-2.0-1.rockspec...
Using https://luarocks.org/turbo-2.0-1.rockspec... switching to 'build' mode
Cloning into 'turbo'...

... skipped...

Warning: variable CFLAGS was not passed in build_variables
make -C deps/http-parser library
make[1]: Entering directory '/tmp/luarocks_turbo-2.0-1-6183/turbo/deps/http-parser'
gcc -I. -DHTTP_PARSER_STRICT=0  -fPIC -Wall -Wextra -Werror -O3  -c http_parser.c -o libhttp_parser.o
gcc  -shared -Wl,-soname=libhttp_parser.so.2.1 -o libhttp_parser.so.2.1 libhttp_parser.o
make[1]: Leaving directory '/tmp/luarocks_turbo-2.0-1-6183/turbo/deps/http-parser'
gcc -Ideps/http-parser/ -shared -O3 -Wall -g -fPIC deps/http-parser/libhttp_parser.o deps/turbo_ffi_wrap.c -o libtffi_wrap.so -lcrypto -lssl
==== Installing Turbo.lua v2.0.0 to: ====
==== /usr/local/lib/lua/5.1 and ====
==== /usr/local/share/luajit-2.0.4 ====
mkdir -p /usr/local/lib
mkdir -p /usr/local/share/lua/5.1/turbo
mkdir: cannot create directory ‘/usr/local/share/lua’: Permission denied
Makefile:111: recipe for target 'install' failed
make: *** [install] Error 1

Error: Build error: Failed installing.

P.S. the OS is Arch Linux, x86_64 It would be nice to have an installation inside user's dir, i.e. without needing root privileges.

nagadomi commented 9 years ago

I have same problem. I couldn't install Turbo on Torch7's environment. But I was able to solve this issue with the following command:

PREFIX=$HOME/torch/install luarocks install turbo
kernelsauce commented 9 years ago

I will have a look at it. I'm not really an expert on luarocks. If you use the included Makefile you can use PREFIX.

josephbburg commented 3 years ago

@nagadomi coming here from waifu2x, too. Could you please include something in the readme to warn about this? Thanks.