Dezi::App installation error

7 views
Skip to first unread message

raja raja

unread,
Apr 26, 2018, 2:44:40 PM4/26/18
to dezi-...@googlegroups.com
Hi,

While installing Dezi::App, I see this error. I use Ubuntu 16.04.4 LTS. Though I tried reinstalling List::Util, I get the same error. Strange thing is that cpanm shows Dezi::App installed as correctly. Any suggestions?

% cpanm https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-App-0.015.tar.gz
--> Working on https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-App-0.015.tar.gz
Fetching https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-App-0.015.tar.gz ... OK
Configuring Dezi-App-0.015 ... OK
Building and testing Dezi-App-0.015 ... OK
Successfully installed Dezi-App-0.015
1 distribution installed

% perldoc -l deziapp
/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp

% deziapp -h
List::Util version 1.45 required--this is only version 1.4202 at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose.pm line 15.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose.pm line 15.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Dezi/CLI.pm line 2.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Dezi/CLI.pm line 2.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp line 6.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp line 6.

Thank you!

Peter Karman

unread,
Apr 26, 2018, 3:03:47 PM4/26/18
to dezi-...@googlegroups.com
raja raja wrote on 4/26/18 1:44 PM:
> Hi,
>
> While installing Dezi::App, I see this error. I use Ubuntu 16.04.4 LTS. Though I tried reinstalling List::Util, I get the same error. Strange thing is that cpanm shows Dezi::App installed as correctly. Any suggestions?
>
> % cpanm https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-App-0.015.tar.gz
> --> Working on https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-App-0.015.tar.gz
> Fetching https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-App-0.015.tar.gz ... OK
> Configuring Dezi-App-0.015 ... OK
> Building and testing Dezi-App-0.015 ... OK
> Successfully installed Dezi-App-0.015
> 1 distribution installed
>
> % perldoc -l deziapp
> /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp
>
> % deziapp -h
> List::Util version 1.45 required--this is only version 1.4202 at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.

I have had this same problem in the past, and it usually came down to multiple
versions of Perl and multiple @INC paths.

The first line of the deziapp script is

#!/usr/bin/env perl

which will use whatever perl binary is first in your PATH.

Try:

% which perl

and

% perl -V

and

% perl -e 'use List::Util 1.45'

to help diagnose how your system is set up. My guess is that the perl at

/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl

is not first in your PATH (the same as the output of "which perl").

--
Peter Karman . he/him/his . 785.337.0405 . https://karpet.github.io/

raja raja

unread,
Apr 26, 2018, 4:03:06 PM4/26/18
to dezi-...@googlegroups.com
Thank you Peter. Below are config details.

I tried changing the PATH, but I still get the same error when I run 'deziapp' command.
export PATH=/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl:$PATH

One other thing, unlike Dezi::App, when I install 'Dezi', it seems to install and run perfectly alright.

% cpanm https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-0.004002.tar.gz
--> Working on https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-0.004002.tar.gz
Fetching https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-0.004002.tar.gz ... OK
Configuring Dezi-0.004002 ... OK
Building and testing Dezi-0.004002 ... OK
Successfully installed Dezi-0.004002
1 distribution installed
% dezi
HTTP::Server::PSGI: Accepting connections at http://0:5000/

----------------------------------------------

% which perl
/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl

% perl -V
Summary of my perl5 (revision 5 version 24 subversion 0) configuration:

Platform:
osname=linux, osvers=4.4.0-36-generic, archname=x86_64-linux
uname='linux user1pc 4.4.0-36-generic #55-ubuntu smp thu aug 11 18:01:55 utc 2016 x86_64 x86_64 x86_64 gnulinux '
config_args='-de -Dprefix=/home/user1/perl5/perlbrew/perls/perl-5.24.0 -Aeval:scriptdir=/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
ccversion='', gccversion='5.4.0 20160609', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector-strong -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/5/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.23.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.23'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector-strong'


Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_COPY_ON_WRITE
PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME
USE_PERLIO USE_PERL_ATOF
Locally applied patches:
Devel::PatchPerl 1.38
Built under linux
Compiled at Sep 9 2016 19:58:04
%ENV:
PERLBREW_BASHRC_VERSION="0.76"
PERLBREW_HOME="/home/user1/.perlbrew"
PERLBREW_MANPATH="/home/user1/perl5/perlbrew/perls/perl-5.24.0/man"
PERLBREW_PATH="/home/user1/perl5/perlbrew/bin:/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin"
PERLBREW_PERL="perl-5.24.0"
PERLBREW_ROOT="/home/user1/perl5/perlbrew"
PERLBREW_VERSION="0.76"
@INC:
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0
.

% perl -e 'use List::Util 1.45'
%

----------------------------------------------

Thanks again!



> Sent: Thursday, April 26, 2018 at 12:03 PM
> From: "Peter Karman" <pe...@peknet.com>
> To: dezi-...@googlegroups.com
> Subject: Re: [dezi-search] Dezi::App installation error
> --
> Dezi search platform . http://dezi.org/
> ---
> You received this message because you are subscribed to the Google Groups "dezi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dezi-search...@googlegroups.com.
> To post to this group, send email to dezi-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/dezi-search.
> For more options, visit https://groups.google.com/d/optout.
>

Peter Karman

unread,
Apr 26, 2018, 5:17:45 PM4/26/18
to dezi-...@googlegroups.com
raja raja wrote on 4/26/18 3:03 PM:
> Thank you Peter. Below are config details.
>
> I tried changing the PATH, but I still get the same error when I run 'deziapp' command.
> export PATH=/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl:$PATH

That should be:

export PATH=/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin:$PATH

i.e. you include the directory in PATH, not the full command name.

However, based on the "which perl" output, I don't think the PATH is your problem.


>
> One other thing, unlike Dezi::App, when I install 'Dezi', it seems to install and run perfectly alright.
>
> % cpanm https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-0.004002.tar.gz
> --> Working on https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-0.004002.tar.gz
> Fetching https://cpan.metacpan.org/authors/id/K/KA/KARMAN/Dezi-0.004002.tar.gz ... OK
> Configuring Dezi-0.004002 ... OK
> Building and testing Dezi-0.004002 ... OK
> Successfully installed Dezi-0.004002
> 1 distribution installed
> % dezi
> HTTP::Server::PSGI: Accepting connections at http://0:5000/
>


The first line of the "dezi" command in source is

#!/usr/bin/perl

which IIRC cpan will update to the full path of the actual perl binary when it
is installed.

That's different than "deziapp". I should probably make them the same, so that
at least it will fail consistently.

Again, I suspect you have multiple versions of Perl on this system, and the @INC
is being evaluated differently.

Try editing the deziapp and dezi files to include this line just after the first
shebang line:

die $^X;

and then trying invoking each. They should die with the full path of the Perl
binary which invoked them.

This same error has happened to me in the past, and inevitably it turned out
that an include path somewhere was mistaken. Not your fault.

The quick fix is likely to hardcode the deziapp shebang line to be identical to
whatever dezi is.


> ----------------------------------------------
>
> % which perl
> /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl
>
> % perl -V
> Summary of my perl5 (revision 5 version 24 subversion 0) configuration:
>
> Platform:
> osname=linux, osvers=4.4.0-36-generic, archname=x86_64-linux
> uname='linux user1pc 4.4.0-36-generic #55-ubuntu smp thu aug 11 18:01:55 utc 2016 x86_64 x86_64 x86_64 gnulinux '
> config_args='-de -Dprefix=/home/user1/perl5/perlbrew/perls/perl-5.24.0 -Aeval:scriptdir=/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin'
>
> % perl -e 'use List::Util 1.45'
> %
>

that last line makes me think that the env perl is not what is invoking deziapp.

pek

raja raja

unread,
May 2, 2018, 2:06:15 PM5/2/18
to dezi-...@googlegroups.com
Thanks Peter. I did some more tests:

Shebang line in both files (dezi and deziapp) is the same, i.e.:
#!/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl

Here is what I did:

I added 'die $^X;' after the first shebang line in file: /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/dezi . This is the output that I get as a result:

% dezi
/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/dezi line 2.

When I remove 'die $^X;' from the dezi file, dezi works normal as expected.


I then updated Dezi::App to the latest version: Dezi-App-0.016

I added 'die $^X;' after the first shebang line in file: /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp, and here is what I get:

#!/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl
die $^X;

#Before adding 'die $^X;':
% deziapp
List::Util version 1.45 required--this is only version 1.4202 at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose.pm line 15.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose.pm line 15.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Dezi/CLI.pm line 2.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Dezi/CLI.pm line 2.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp line 7.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp line 7.

#After adding 'die $^X;':
% deziapp
List::Util version 1.45 required--this is only version 1.4202 at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose/Exporter.pm line 9.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose.pm line 15.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/Moose.pm line 15.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Dezi/CLI.pm line 2.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/Dezi/CLI.pm line 2.
Compilation failed in require at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp line 8.
BEGIN failed--compilation aborted at /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp line 8.

This file is being read by the system since last and second-last line in the error output above, we have 'line 7' changed to 'line 8'.

When I remove '/perl' from the shebang line in deziapp as (with 2nd line as 'die $^X;'):
#!/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin
die $^X;

I get the following output:

% deziapp
bash: /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/deziapp: /home/user1/perl5/perlbrew/perls/perl-5.24.0/bin: bad interpreter: Permission denied


I also checked where List::Util 1.45 is installed by cpanm, here is the result:
% perldoc -l List::Util
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/List/Util.pm

Thanks again, Peter!


> Sent: Thursday, April 26, 2018 at 2:17 PM
> From: "Peter Karman" <pe...@peknet.com>
> To: dezi-...@googlegroups.com
> Subject: Re: [dezi-search] Dezi::App installation error
>

Peter Karman

unread,
May 2, 2018, 2:17:10 PM5/2/18
to dezi-...@googlegroups.com
raja raja wrote on 5/2/18 1:06 PM:
> Thanks Peter. I did some more tests:
>
> Shebang line in both files (dezi and deziapp) is the same, i.e.:
> #!/home/user1/perl5/perlbrew/perls/perl-5.24.0/bin/perl
>


Ok, that's good. That means the same interpret should be used.


> #Before adding 'die $^X;':
[snip]

> #After adding 'die $^X;':
[snip]

I forgot that 'die' is happening *after* the "use List::Util" is evaluated, so
by then it's too late to catch the error.


> I also checked where List::Util 1.45 is installed by cpanm, here is the result:
> % perldoc -l List::Util
> /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/List/Util.pm
>

what about:

% find /home/user1/perl5/perlbrew/perls/perl-5.24.0/ -name Util.pm | grep List

I'll bet you get 2 results from that.

raja raja

unread,
May 2, 2018, 3:10:14 PM5/2/18
to dezi-...@googlegroups.com
Yes Peter, you are right, here is the result. I am not sure why cpanm is installing the List::Util in two places. I thought I just installed perl 5.24 using perlbrew with regular defaults and just used cpanm to install modules.

% find /home/user1/perl5/perlbrew/perls/perl-5.24.0/ -name Util.pm | grep List
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/List/Util.pm
/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux/List/Util.pm

How can I resolve this situation? Should I remove site_perl directory in the first path (/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/)?

Thanks much!



> Sent: Wednesday, May 02, 2018 at 11:17 AM
> From: "Peter Karman" <pe...@peknet.com>
> To: dezi-...@googlegroups.com
> Subject: Re: [dezi-search] Dezi::App installation error
>

Peter Karman

unread,
May 2, 2018, 3:19:36 PM5/2/18
to dezi-...@googlegroups.com
raja raja wrote on 5/2/18 2:10 PM:
> Yes Peter, you are right, here is the result. I am not sure why cpanm is installing the List::Util in two places. I thought I just installed perl 5.24 using perlbrew with regular defaults and just used cpanm to install modules.
>
> % find /home/user1/perl5/perlbrew/perls/perl-5.24.0/ -name Util.pm | grep List
> /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/5.24.0/x86_64-linux/List/Util.pm
> /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux/List/Util.pm
>
> How can I resolve this situation? Should I remove site_perl directory in the first path (/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/site_perl/)?
>

I would remove the older version.

fwiw, this happened to me too several months ago, using normal 'cpan' and a
locally compiled Perl, on OS X. So I don't think it's a problem with cpanm or
perlbrew.

raja raja

unread,
May 2, 2018, 4:06:39 PM5/2/18
to dezi-...@googlegroups.com
Yessss, that worked...:)! deziapp works now.

The older version of List::Util was at '/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux/List/Util.pm'. So, I deleted 'List' folder in /home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux/ .

cpanm and perlbrew have worked like charm in all my cases: may be I did some mistake somewhere in their installation which created these two different paths in '/home/user1/perl5/perlbrew/perls/perl-5.24.0/lib/' folder:

> site_perl/5.24.0/x86_64-linux/List/Util.pm
> 5.24.0/x86_64-linux/List/Util.pm

Thanks a lot, Peter!



> Sent: Wednesday, May 02, 2018 at 12:19 PM
> From: "Peter Karman" <pe...@peknet.com>
> To: dezi-...@googlegroups.com
> Subject: Re: [dezi-search] Dezi::App installation error
>
Reply all
Reply to author
Forward
0 new messages