0

I'm using a hosted Linux machine so I don't have permissions to write into the /usr/lib directory.

I need Spreadsheet::Read and few other modules to be installed. I have all these required libraries in my local home directory.

In the perl code, I am using-

#include local module
use FindBin qw($Bin);
use lib "$Bin/perl5/lib/perl5";
use lib "$Bin/perl5/lib/perl5/x86_64-linux-gnu-thread-multi";
use Getopt::Long;
use Spreadsheet::Read;
use Template;
use lib "$Bin";
use Register;

So I have Spreadsheet and other libraries in the path ../perl5/lib/perl5/x86_64-linux-gnu-thread-multi. But still when I run, I get this error:

Uncaught exception from user code: Parser for XLSX is not installed at ./main.pl line 42 at /home/nxf36037/ipxact-register-generator-master/code/perl5/lib/perl5/Spreadsheet/Read.pm line 416 Spreadsheet::Read::ReadData('reg1000.xlsx') called at ./main.pl line 42

This is my line 42:

my $book  = ReadData($input);

I am unwilling to use local::lib, Could you please help with this issue?

Ignatius
  • 1,167
  • 2
  • 21
  • 30
  • I would recommend using [`perlbrew`](https://perlbrew.pl/) and then `cpanm` to install the missing modules instead of using this setup with `lib` and `FindBin`. Then `cpanm` would automatically find and install missing dependencies – Håkon Hægland Aug 09 '17 at 07:11
  • [`Spreadsheet::Read`](http://search.cpan.org/~hmbrand/Spreadsheet-Read/Read.pm) needs additional modules to read various file formats, namely, it needs `Spreadsheet::ParseXLSX` to read `.xlsx` files. – el.pescado - нет войне Aug 09 '17 at 07:54
  • @HåkonHægland I tried installing perlbrew , After installation it asks me to edit .bash_profile file. I don't have permission to edit it. – Mohit Gandhi Aug 09 '17 at 08:47
  • @MohitGandhi Hi. I think you can put the edits in `.bashrc` instead of `.bash_profile`. Feel free to contact me by email if you have further questions. – Håkon Hægland Aug 09 '17 at 08:49

0 Answers0