Difegue / LANraragi

Web application for archival and reading of manga/doujinshi. Lightweight and Docker-ready for NAS/servers.
https://lrr.tvc-16.science
MIT License
2.19k stars 155 forks source link

Issue installing with Homebrew on Debian Stretch #388

Closed wimpb closed 3 years ago

wimpb commented 3 years ago

Following the steps on the Homebrew instruction guide I installed Homebrew, and then attempted to install LRR with "brew install lanraragi" and got this error:

Last 15 lines from /home/USER/.cache/Homebrew/Logs/lanraragi/09.perl:
Working Directory: /tmp/lanraragi-20210117-24080-1fixhiq/LANraragi-v.0.7.5

IPC::Cmd package installed, proceeding...
Config::AutoConf package installed, proceeding...

Will now check if all LRR software dependencies are met.

Checking for Redis...
OK!
Checking for GhostScript...
OK!
Checking for libarchive...
Checking for archive.h... Checking for cc... gcc-5
NOT FOUND! Please install libarchive and ensure its headers are present. at ./tools/install.pl line 100.
no

READ THIS: https://docs.brew.sh/Troubleshooting

According to Homebrew, all dependencies are installed, including libarchive: Required: cpanminus ✔, ghostscript ✔, giflib ✔, imagemagick@6 ✔, jpeg ✔, libpng ✔, node ✔, openssl@1.1 ✔, perl ✔, redis ✔, libarchive ✔

Difegue commented 3 years ago

The brew formula does some header magic to use the builtin libarchive on macOS, which I'm not sure works properly in the linuxbrew context.

Does the install work if you install libarchive on the side through apt-get? I know it kinda defeats the point of using brew but ¯\_(ツ)_/¯

wimpb commented 3 years ago

As far as I can tell it's already installed there too. I'm not too familiar with perl or compiling so honestly I don't really know what I'm doing.

libarchive13/oldstable,oldstable,now 3.2.2-2+deb9u2 amd64 [installed,automatic]
  Multi-format archive and compression library (shared library)
libarchive-dev/oldstable,oldstable,now 3.2.2-2+deb9u2 amd64 [installed]
  Multi-format archive and compression library (development files)

They're installed because I originally tried to install from source but had issues with that.

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'run',
1 verbose cli   'lanraragi-installer',
1 verbose cli   'install-full' ]
2 info using npm@6.14.10
3 info using node@v10.23.1
4 verbose run-script [ 'prelanraragi-installer',
4 verbose run-script   'lanraragi-installer',
4 verbose run-script   'postlanraragi-installer' ]
5 info lifecycle lanraragi@0.7.5~prelanraragi-installer: lanraragi@0.7.5
6 info lifecycle lanraragi@0.7.5~lanraragi-installer: lanraragi@0.7.5
7 verbose lifecycle lanraragi@0.7.5~lanraragi-installer: unsafe-perm in lifecycle true
8 verbose lifecycle lanraragi@0.7.5~lanraragi-installer: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/o$
9 verbose lifecycle lanraragi@0.7.5~lanraragi-installer: CWD: /opt/LANraragi
10 silly lifecycle lanraragi@0.7.5~lanraragi-installer: Args: [ '-c', 'perl ./tools/install.pl "install-full"' ]
11 silly lifecycle lanraragi@0.7.5~lanraragi-installer: Returned: code: 1  signal: null
12 info lifecycle lanraragi@0.7.5~lanraragi-installer: Failed to exec lanraragi-installer script
13 verbose stack Error: lanraragi@0.7.5 lanraragi-installer: `perl ./tools/install.pl "install-full"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:198:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:198:13)
13 verbose stack     at maybeClose (internal/child_process.js:982:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid lanraragi@0.7.5
15 verbose cwd /opt/LANraragi
16 verbose Linux 4.9.0-14-amd64
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "lanraragi-installer" "install-full"
18 verbose node v10.23.1
19 verbose npm  v6.14.10
20 error code ELIFECYCLE
21 error errno 1
22 error lanraragi@0.7.5 lanraragi-installer: `perl ./tools/install.pl "install-full"`
22 error Exit status 1
23 error Failed at the lanraragi@0.7.5 lanraragi-installer script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

I figured this may have been an issue with vendor perl as the guide mentioned and decided to try the homebrew method. I've no idea if these errors are related. I may try using perlbrew if this doesn't work or worst case scenario I'll install on my windows PC.

Difegue commented 3 years ago

This second log is quite odd, it's all npm which almost makes it look like the perl installer didn't get to run. Running perl ./tools/install.pl "install-full" by itself should give you a clearer output.

wimpb commented 3 years ago

Ran it, from the log:

cpanm (App::cpanminus) 1.7042 on perl 5.024001 built for x86_64-linux-gnu-thread-multi
Work directory is /root/.cpanm/work/1611096227.15216
You have make /usr/bin/make
You have LWP 6.15
You have /bin/tar: tar (GNU tar) 1.29
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
--> Working on ./tools/.
Entering /opt/LANraragi/tools
Configuring /opt/LANraragi/tools
-> OK
Checking if you have Module::Pluggable 5.2 ... Yes (5.2)
Checking if you have Proc::Simple 1.32 ... Yes (1.32)
Checking if you have Mojolicious 8.65 ... Yes (8.70)
Checking if you have Test::Harness 3.42 ... Yes (3.42)
Checking if you have Minion::Backend::SQLite v5.0.3 ... Yes (v5.0.3)
Checking if you have IPC::Cmd 1.02 ... Yes (1.04)
Checking if you have Parallel::Loops 0.1 ... Yes (0.10)
Checking if you have Redis 1.995 ... Yes (1.998)
Checking if you have Crypt::Rijndael 1.14 ... Yes (1.15)
Checking if you have Encode 3.01 ... Yes (3.08)
Checking if you have Archive::Extract::Libarchive 0.38 ... Yes (0.38)
Checking if you have Logfile::Rotate 1.04 ... Yes (1.05)
Checking if you have Sort::Naturally 1.03 ... Yes (1.03)
Checking if you have Sys::CpuAffinity 1.12 ... Yes (1.12)
Checking if you have Mojolicious::Plugin::RenderFile 0.12 ... Yes (0.12)
Checking if you have Test::MockObject 1.20200122 ... Yes (1.20200122)
Checking if you have Mojolicious::Plugin::TemplateToolkit 0.005 ... Yes (0.005)
Checking if you have local::lib 2.000024 ... Yes (2.000024)
Checking if you have IO::Socket::SSL 2.067 ... No (2.044 < 2.067)
Checking if you have Authen::Passphrase 0.008 ... Yes (0.008)
Checking if you have Cpanel::JSON::XS 4.06 ... Yes (4.25)
Checking if you have Digest::SHA 6.02 ... Yes (6.02)
Checking if you have URI::Escape 1.74 ... Yes (3.31)
Checking if you have Compress::Zlib 2.087 ... Yes (2.100)
Checking if you have Minion 10.13 ... Yes (10.15)
Checking if you have Archive::Peek::Libarchive 0.38 ... Yes (0.38)
Checking if you have File::ReadBackwards 1.05 ... Yes (1.05)
Checking if you have File::ChangeNotify 0.31 ... Yes (0.31)
==> Found dependencies: IO::Socket::SSL
Searching IO::Socket::SSL (2.067) on cpanmetadb ...
--> Working on IO::Socket::SSL
Fetching http://www.cpan.org/authors/id/S/SU/SULLR/IO-Socket-SSL-2.068.tar.gz
-> OK
Unpacking IO-Socket-SSL-2.068.tar.gz
Entering IO-Socket-SSL-2.068
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.10_02)
Checking if you have Net::SSLeay 1.46 ... Yes (1.80)
Configuring IO-Socket-SSL-2.068
Running Makefile.PL
API-different OpenSSL versions compiled in (0x1010003f) vs linked (0x1010109f) at Makefile.PL line 68.
-> N/A
-> FAIL Configure failed for IO-Socket-SSL-2.068. See /root/.cpanm/work/1611096227.15216/build.log for details.
-> FAIL Installing the dependencies failed: Installed version (2.044) of IO::Socket::SSL is not in range '2.067'
-> FAIL Bailing out the installation for ./tools/..
wimpb commented 3 years ago

Tried up update IO::Socket::SSL through cpan and it gave the same error, not really surprising I guess. This may be the result of my spaghetti mess of a homeserver.

API-different OpenSSL versions compiled in (0x1010003f) vs linked (0x1010109f) at Makefile.PL line 68.

Difegue commented 3 years ago

Yeah, that one looks like you're running a weird/outdated version of openSSL. For debian I think the package is libssl-dev. The homebrew version certainly wouldve been better in this case 😓

wimpb commented 3 years ago

Ok I did manage to install without any errors using perlbrew, although it had a few hassles of its own. I'll document what happened in case anyone ends up in the same situation as me.

I followed the instructions on the perlbrew site (https://perlbrew.pl/) to install perlbrew. Then to install perl, I used: perlbrew install perl-5.32.0 The perlbrew site has perlbrew install perl-5.16.0, although in my case version 5.16.0 would fail to install, apparently due to a particular library having a bug that manifested in my situation. I did manage to get 5.18.2 to install, but LRR requires at least 5.20.2(?). So I just went with 5.30.2 which installed fine. 5.32.0 would probably work as well I'm guessing.

For some reason the perlbrew switch command wasn't working for me, so I used the exec command to install LRR perlbrew exec --with perl-5.30.2 perl ./tools/install.pl "install-full"

Looking back at what actually worked it was pretty simple, but it took me a while to bumble through that.