[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error: Can't locate lsmb-request.pl in @INC



All,

There is an error that comes up from LedgerSMB on Debian or Debian derived systems with perl-base version 5.22.2-4 or newer, caused by the 'current directory' (".") no longer being in the '@INC' Perl search path by default. It shows up at when using CGI and Apache to access the LedgerSMB application, so at least for version 1.4.x (and 1.3.x) which use that by default. An example from an Apache error.log when attempting to access setup.pl is as follows:

Can't locate lsmb-request.pl in @INC (@INC contains: /etc/perl
/usr/local/lib/i386-linux-gnu/perl/5.24.1 /usr/local/share/perl/5.24.1
/usr/lib/i386-linux-gnu/perl5/5.24 /usr/share/perl5
/usr/lib/i386-linux-gnu/perl/5.24 /usr/share/perl/5.24
/usr/local/lib/site_perl /usr/lib/i386-linux-gnu/perl-base) at
/usr/share/ledgersmb/setup.pl line 8.


An LedgerSMB issue [1] has been opened for the issue; and a Debian bug was created [2] and forwarded to it. There is also a "User Tag" in Debian being used to track packages affected by the issue [3].

The currently known distributions where this is being seen or is expected to be present is Debian Testing ('Stretch'), Debian Unstable ("Sid"), and the current Ubuntu development version ("Zesty").

A work around is that there is a line in the /etc/perl/sitecustomize.pl file on Debian systems that can be commented out in order to not remove the "." (current directory) from the Perl @INC path. The following line is uncommented by default on current Debian Testing & Unstable systems:

  pop @INC if $INC[-1] eq '.' and !$ENV{PERL_USE_UNSAFE_INC};

If left that way, the error will come up when attempting to access LedgerSMB running under the Apache web server (which is the default for v1.4.x). If that line is commented out, the error does not come up. (Note that it is commented out by default on Debian v8, 'Jessie'. ) 

There may be other work arounds, like setting the PERL_USE_UNSAFE_INC environment variable, but that I have not yet tested. And there may not be work around like that on any system (not just Debian) with Perl v5.24, as I understand that not having the current directory in @INC is compiled into the interpreter, but that would be need to be tested further. 





Robert James Clay
rjclaygmail.com
..hidden..

[1] https://github.com/ledgersmb/LedgerSMB/issues/2275
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844276
[3] https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=perl-cwd-inc-removal;users=..hidden..
=

--
Robert J. Clay
..hidden..
------------------------------------------------------------------------------
_______________________________________________
Ledger-smb-users mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users