473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to install PERL module Text::CSV_XS needed for H.M.Brand's cvs2xls.pl?

I was trying to use H.M.Brands script cvs2xls.pl and got this message:Can't locate auto/Text/CSV_XS/is_quoted.al in @INC
I thought I must not have this module installed. Although my perl version is v5.8.5.
I tried a google search:
Does PERL v5.8.5 have the Text::CSV_XS; installed?
I didn't get good results from this.
I think it should be installed, after looking in CPAN dependcies I got this:
provides:
Text::CSV_XS:
file: CSV_XS.pm
version: 0.80
requires:
perl: 5.005
DynaLoader: 0
IO::Handle: 0



I tried to install the module in case it is not installed. When I unzip the file it creates a directory:Text-CSV_XS-0.80

I acess it with:
[code]
use lib '/nfs/an/disks/an_home_disk013/';
[/CODE

I get the same error message.

I tried this:
Expand|Select|Wrap|Line Numbers
  1. use lib '/nfs/an/disks/an_home_disk013/Text-CSV_XS-0.80';
  2.  
Same message.

So I tried to create a directory & copy all the files in directory Text-CSV_XS-0.80 to it so my directory is:
/nfs/an/disks/an_home_disk013/Text/CSV_XS
Changed my use statment back to:

Expand|Select|Wrap|Line Numbers
  1. use lib '/nfs/an/disks/an_home_disk013/';
  2.  
Same message.

Has anyone had this problem before or have some insight? I'm kind of beginer PERL learner.
I tried searching for the "is_quoted.al"
grep -r "is_quoted.al" .
Its not there.

I tried a google search for my problem and didn't understand the solution or not sure its transferable to my problem.
http://twoalpha.blogspot.com/2007/09...an-locate.html
Jan 21 '11 #1
8 20981
I found this but I'm trying to decipher it..and how to unchroot? I'm at a big company not sure I should mess around to much with what I don't understand. http://www.steveshipway.org/forum/vi...1f321a9438277f
Jan 21 '11 #2
Thanks! Those are some good resources. It looks like when I run the commands to install it everything works.
In your expereince when you just do the command:
Expand|Select|Wrap|Line Numbers
  1.  perl Makefile.PL
  2.       make
  3.       make test
  4.  
Would your use statement include the newly created directory? So in my case the newly created directory is 'Text-CSV_XS-0.80'. I tried both ways and they didn't work. So it might be "Make sure you have the appropriate permissions to install the module in your Perl 5 library directory. Often, you'll need to be root." What is root? Although I didn't get any error messages when I run the install commands. Just when I try to execute my script.

Expand|Select|Wrap|Line Numbers
  1. use lib '/nfs/an/disks/an_home_disk013/uell1/bin/Integ/Text-CSV_XS-0.80';
  2.  
Jan 21 '11 #4
RonB
589 Expert Mod 512MB
Did you do the 'make install'?

Since you didn't specify a custom PREFIX location when running the Makefile.PL and assuming the install was successful, then the module will be installed in its default location and will be found by perl within the @INC directories. So, you should not need the lib statement. You'll need to use a standard 'use Text::CSV_XS;' statement.

If you did specify a PREFIX, then you will need to use the lib statement prior to the 'use Text::CSV_XS;' statement and the lib statement should point to the directory that you specified in the PREFIX statement.
Jan 22 '11 #5
Yes I did the 'make' install and didn't specify a PREFIX location.
It looks like installed correctly. I get the message:
"All tests successful, 2 tests skipped."

I think it might be a permission issue. Is there a way to check if you are statically or dynamically linked? I'm waiting to hear back from IT on this.

" Most Unix systems have dynamic linking -- if yours doesn't, or if for another reason you have a statically-linked perl, and the module requires compilation, you'll need to build a new Perl binary that includes the module. Again, you'll probably need to be root."
Jan 24 '11 #6
RonB
589 Expert Mod 512MB
./blib/lib/ is the build directory which is not (or should not be) part of the list of directories in the @INC array.

The auto at the beginning of that path is part of the path to where the module was installed.

The error you received indicates to me that you made several failed attempts to install the module and possibly the 2 skipped tests are related to the use of the is_quoted() sub.

You could try and copy the is_quoted.al file under ./blib to auto/Text/CSV_XS/

If that doesn't work I'd completely uninstall the module and delete all of its build directories, then try to reinstall.

When you reinstall, redirect all output to a file for later inspection. It's possible that you'll find non fatal build errors that relate to is_quoted.al
Jan 24 '11 #7
I would copy but when I do
Expand|Select|Wrap|Line Numbers
  1.   grep -r "is_quoted.al" .
  2.  
the file isn't in ./blib.

But when I do direct my output I get:
"Warning: You do not have permissions to install into /usr/pkgs/perl/5.8.5/lib/site_perl/5.8.5/x86_64-linux at /usr/pkgs/perl/5.8.5/lib/5.8.5/ExtUtils/Install.pm line 114.
Cannot forceunlink /usr/pkgs/perl/5.8.5/lib/site_perl/5.8.5/x86_64-linux/auto/Text/CSV_XS/CSV_XS.so: Read-only file system at /usr/pkgs/perl/5.8.5/lib/5.8.5/File/Find.pm line 874
make: *** [pure_site_install] Error 255

So it looks like it is a permission issue. Thanks for the help!
Jan 24 '11 #8
chorny
80 Expert
perl does not include Text::CSV/Text::CSV_XS modules. You need to install them. Or for Text::CSV you can just provide path to it. Text::CSV_XS requires compilation (it is the variant of Text::CSV written in C for speed, modern Text::CSV will automatically use it if it is installed). You can install it with CPAN shell (you would need to be root for this).

> perl -MCPAN -e "shell"
cpan> install Text::CSV_XS

Upgrading CPAN shell itself is also a good idea - you have an old Perl.
cpan> install CPAN

There are also possibilities to install without requiring root, but they are harder.
Jan 26 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Mothra | last post by:
Hi All, I am the current author of the Astro-Sunrise perl module http://search.cpan.org/~rkhill/Astro-Sunrise-0.91/Sunrise.pm and was wondering if it would be worth while to convert it to...
1
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
0
by: Envex Developments | last post by:
Hey guys, I have a need to install the DBD::Pg Perl module on many shared web servers, which do not have PostgreSQL installed. Then the DBD::Pg module will just connect to a remote PostgreSQL...
0
by: Envex Developments | last post by:
Hey guys, I have a need to install the DBD::Pg Perl module on many shared web servers, which do not have PostgreSQL installed. Then the DBD::Pg module will just connect to a remote PostgreSQL...
0
by: srinu123 | last post by:
Hi all, I am tring the install perl module(GD-2.35) on my linux machine.But i am getting some error...Please find the error below... D.xs:1450: invalid lvalue in assignment GD.xs:1450:...
4
by: jrefran | last post by:
Hi Everyone! I have my Solaris 2.9 box (server) and have installed Apache 2.0.59, PHP4 and Perl 5.8.8. I'm also using Oracle 8.0.5. My dilemma is since I'm first time in Perl, I don't know...
3
crazy4perl
by: crazy4perl | last post by:
hi!!!! i m trying to install the perl module WWW::Orkut::Spider. but it is not showing in ppm. can anyone plz tell me how to install it. thanks
2
by: somsub | last post by:
Hi all, Here is my samle code use strict ; use warnings ; use IO::Uncompress::Unzip ; When I compiled this three lines of code in win32 I got error like below.
2
by: sbettadpur | last post by:
hello, I am trying to install the Text::NLP::Stanford::EntityExtract perl module on windows xp. But its not installing properly... can anybody tell solution for the above problem. But its...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.