Can't locate loadable object for module Template::Stash::XS

Moderator: crythias

Post Reply
klabarre
Znuny newbie
Posts: 3
Joined: 03 Jun 2016, 20:53
Znuny Version: 4.0000

Can't locate loadable object for module Template::Stash::XS

Post by klabarre »

I'm trying to install Znuny 6.0.35 on an Amazon Linux 2 server as a test to migrate an instance of OTRS from another server. The first step is to install Znuny can get it working. I've installed all prereqs per documentation and the perl module test passes everything. Apache HTTPd is able to display the test page, but any request to the Znuny page /otrs/index.pl fails with the following. I've reinstalled Template::Stash::XS several times, SELinux is disabled. Any ideas?

Code: Select all

ERROR: OTRS-CGI-10 Perl: 5.16.3 OS: linux Time: Sun Jun 20 15:18:34 2021

 Message: Can't locate loadable object for module Template::Stash::XS in @INC (@INC contains: /usr/Custom /usr/Kernel/cpan-lib /usr /usr/sbin/../../Custom /usr/sbin/../../Kernel/cpan-lib /usr/sbin/../.. /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /etc/httpd) at /opt/otrs//Kernel/Output/HTML/Layout/Template.pm line 17.
Compilation failed in require at /opt/otrs//Kernel/Output/HTML/Layout/Template.pm line 17.
BEGIN failed--compilation aborted at /opt/otrs//Kernel/Output/HTML/Layout/Template.pm line 17.
Compilation failed in require at /opt/otrs//Kernel/System/Main.pm line 86.


 RemoteAddress: 24.227.164.114
 RequestURI: /otrs/index.pl

 Traceback (2541):
   Module: Kernel::System::Main::RequireBaseClass Line: 123
   Module: Kernel::Output::HTML::Layout::new Line: 439
   Module: Kernel::System::ObjectManager::_ObjectBuild Line: 307
   Module: Kernel::System::ObjectManager::Get Line: 201
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 809
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 39
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

ERROR: OTRS-CGI-10 Perl: 5.16.3 OS: linux Time: Sun Jun 20 15:18:34 2021

 Message: Could not load class Kernel::Output::HTML::Layout::Template.

 RemoteAddress: 24.227.164.114
 RequestURI: /otrs/index.pl

 Traceback (2541):
   Module: Kernel::Output::HTML::Layout::new Line: 439
   Module: Kernel::System::ObjectManager::_ObjectBuild Line: 307
   Module: Kernel::System::ObjectManager::Get Line: 201
   Module: Kernel::System::Web::InterfaceAgent::Run Line: 809
   Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler Line: 39
   Module: (eval) (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
   Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
   Module: ModPerl::Registry::handler (v1.99) Line: 32

[Sun Jun 20 15:18:34.566290 2021] [:error] [pid 2541] [Sun Jun 20 15:18:34 2021] -e: Could not load class Kernel::Output::HTML::Layout::Template. at /opt/otrs//Kernel/Output/HTML/Layout.pm line 1006.\n
root
Administrator
Posts: 3957
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Can't locate loadable object for module Template::Stash::XS

Post by root »

Hi,

I suggest you've install the module via CPAN. Check how it's done and where it's installed. I had it several times that environmen variables pointed to /root/ to install modules. Check the homedir of the user you used to install if there's a perl5/ directory. If yes get rid of the environment variables and install again.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
skullz
Znuny superhero
Posts: 621
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Can't locate loadable object for module Template::Stash::XS

Post by skullz »

How do you install perl module ? cpan ? if yes, make sure the module didnt install under .root directory

1. Determine the location of the module name that generate the error

shell > perldoc -l PDF::FromHTML

make sure its not under /root/

Usually, should under:
/usr/lib64/perl5/
/usr/share/perl5/
/usr/local/share


2. If not under dir above, uninstall the module first

3. Remove/Comment Out perl default location under user root then relogin into ssh.

shell> vim ~/.bashrc

4. Install back the module
shell > cpan PDF::FromHTML

5. Check back the location (no 1)
Make sure it is not under /root/
klabarre
Znuny newbie
Posts: 3
Joined: 03 Jun 2016, 20:53
Znuny Version: 4.0000

Re: Can't locate loadable object for module Template::Stash::XS

Post by klabarre »

skullz & Roy - You were both a big help. Thank you for pointing me in the right direction. The modules were indeed installed with CPAN and under /root. I believe I have this issue fixed.
Post Reply