turbo icon indicating copy to clipboard operation
turbo copied to clipboard

luarocks --local installation is not working

Open aellwein opened this issue 9 years ago • 3 comments

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.

aellwein avatar Oct 05 '15 17:10 aellwein

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

nagadomi avatar Oct 11 '15 17:10 nagadomi

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.

kernelsauce avatar Oct 13 '15 08:10 kernelsauce

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

josephbburg avatar Dec 16 '20 00:12 josephbburg