• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 960
  • Last Modified:

Can't locate XML/Generator/DBI.pm in @INC

I am getting an error when trying to run a Perl script that will run a Oracle SQL
On a network server, this runs fine and I try to run it on my local laptop and get this
error.  Beforehand, I installed "Strawberry Perl" and wonder if this is the correct or a "good" Perl client to install or not.
Anyways, I have found this command to run and it shows what @INC variable values that are currently in place.
I do see the DBI and do I need to type to whole path to this on the script?
Something like:
use D:/Strawberry/perl/vendor/lib/DBI.pm

Currently on the Perl script I have:

use warnings;
#use DBIx::XML_RDB;
use XML::Generator::DBI;
use XML::Handler::YAWriter;
use XML::Simple;
use Date::Calc qw(Add_Delta_Days);
use DBI qw(:sql_types);
#use DBIx::Dump;
use File::Copy;
use File::Slurp;
use XML::XPath;

The command I used to get the results below is:
perl -MDBI -d -e0


%INC = (
   'AutoLoader.pm' => 'D:/Strawberry/perl/lib/AutoLoader.pm'
   'Carp.pm' => 'D:/Strawberry/perl/lib/Carp.pm'
   'Config.pm' => 'D:/Strawberry/perl/lib/Config.pm'
   'Config_git.pl' => 'D:/Strawberry/perl/lib/Config_git.pl'
   'Config_heavy.pl' => 'D:/Strawberry/perl/lib/Config_heavy.pl'
   'DBI.pm' => 'D:/Strawberry/perl/vendor/lib/DBI.pm'
   'Devel/Peek.pm' => 'D:/Strawberry/perl/lib/Devel/Peek.pm'
   'DynaLoader.pm' => 'D:/Strawberry/perl/lib/DynaLoader.pm'
   'Exporter.pm' => 'D:/Strawberry/perl/lib/Exporter.pm'
   'Exporter/Heavy.pm' => 'D:/Strawberry/perl/lib/Exporter/Heavy.pm'
   'IO.pm' => 'D:/Strawberry/perl/lib/IO.pm'
   'IO/Handle.pm' => 'D:/Strawberry/perl/lib/IO/Handle.pm'
   'List/Util.pm' => 'D:/Strawberry/perl/lib/List/Util.pm'
   'Scalar/Util.pm' => 'D:/Strawberry/perl/lib/Scalar/Util.pm'
   'SelectSaver.pm' => 'D:/Strawberry/perl/lib/SelectSaver.pm'
   'SelfLoader.pm' => 'D:/Strawberry/perl/lib/SelfLoader.pm'
   'Symbol.pm' => 'D:/Strawberry/perl/lib/Symbol.pm'
   'Term/Cap.pm' => 'D:/Strawberry/perl/lib/Term/Cap.pm'
   'Term/ReadKey.pm' => 'D:/Strawberry/perl/vendor/lib/Term/ReadKey.pm'
   'Term/ReadLine.pm' => 'D:/Strawberry/perl/lib/Term/ReadLine.pm'
   'Term/ReadLine/Perl.pm' => 'D:/Strawberry/perl/lib/Term/ReadLine/Perl.pm'
   'Term/ReadLine/readline.pm' => 'D:/Strawberry/perl/lib/Term/ReadLine/readline.pm'
   'XSLoader.pm' => 'D:/Strawberry/perl/lib/XSLoader.pm'
   'dumpvar.pl' => 'D:/Strawberry/perl/lib/dumpvar.pl'
   'feature.pm' => 'D:/Strawberry/perl/lib/feature.pm'
   'perl5db.pl' => 'D:/Strawberry/perl/lib/perl5db.pl'
   'strict.pm' => 'D:/Strawberry/perl/lib/strict.pm'
   'vars.pm' => 'D:/Strawberry/perl/lib/vars.pm'
   'warnings.pm' => 'D:/Strawberry/perl/lib/warnings.pm'
   'warnings/register.pm' => 'D:/Strawberry/perl/lib/warnings/register.pm'
  • 4
  • 4
2 Solutions
You're looking at the wrong module.  You need to install the XML::Generator::DBI module which is not the same as the DBI module.

Use the cpan command line utility to install the module.

cpan install XML::Generator::DBI

FYI, That module hasn't been updated since 2003.
MachinegunnerAuthor Commented:
Thanks for the info!  That worked just fine.
When I ran the program again, I get another error:

"Can't locate XML/Handler/YAWriter.pm in @INC "

Question, are there any other modules that I need to install, based on the
others listed below?  Other than for 'XML::Handler::YAWriter'

use XML::Simple;
use Date::Calc qw(Add_Delta_Days);
use DBI qw(:sql_types);
#use DBIx::Dump;
use File::Copy;
use File::Slurp;
use XML::XPath;
You'll need to install each module that generates that error message.
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

MachinegunnerAuthor Commented:
Ok, I installed most of the modules, but it said that some of them were already there, so no need to worry about those.
I ran the program again and another error came up:
"Can't locate DBD/Oracle.pm in @INC"

So I looked around and tried this command, to install this module, if this is the correct one:
"cpan install DBD::Oracle"
And that came back as not a successfull install, anything else or is there another command that needs to be done?  I do have both the 10g and 11g Oracle client installed on this machine.


C:\s009524>cpan install DBD::Oracle
CPAN: CPAN::SQLite loaded ok (v0.199)
Database was generated on Wed, 09 Oct 2013 20:51:44 GMT
Running install for module 'DBD::Oracle'
Running make for P/PY/PYTHIAN/DBD-Oracle-1.66.tar.gz
CPAN: LWP::UserAgent loaded ok (v6.02)
CPAN: Time::HiRes loaded ok (v1.9721)
Fetching with LWP:
CPAN: YAML loaded ok (v0.73)
CPAN: Digest::SHA loaded ok (v5.61)
Fetching with LWP:
CPAN: Compress::Zlib loaded ok (v2.034)
Checksum for D:\Strawberry\cpan\sources\authors\id\P\PY\PYTHIAN\DBD-Oracle-1.66.tar.gz ok
CPAN: Archive::Tar loaded ok (v1.76)
CPAN: File::Temp loaded ok (v0.22)
CPAN: Parse::CPAN::Meta loaded ok (v1.4401)
CPAN: CPAN::Meta loaded ok (v2.110930)
CPAN: Module::CoreList loaded ok (v2.49)

CPAN.pm: Going to build P/PY/PYTHIAN/DBD-Oracle-1.66.tar.gz

Using DBI 1.628 (for perl 5.012003 on MSWin32-x86-multi-thread) installed in D:/Strawberry/perl/site

Configuring DBD::Oracle for perl 5.012003 on MSWin32 (MSWin32-x86-multi-thread)

Remember to actually *READ* the README file! Especially if you have any problems.

Multiple Oracle homes: C:\ORA10 C:\app\S009524\product\11.2.0\client_1

C:\app\S009524\product\11.2.0\client_1 is first in the PATH, so we'll use that as Oracle's default h

Installing on a MSWin32, Ver#5.1
Using Oracle in C:/app/S009524/product/11.2.0/client_1
Oracle version (11.2)
OCI directory not found, please install OCI in C:/app/S009524/product/11.2.0/client_1 at Makefile.PL
 line 324.
Warning: No success on command[D:\Strawberry\perl\bin\perl.exe Makefile.PL]
  D:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
prerequisite module[DynaLoader] not known
prerequisite module(B) not known
MachinegunnerAuthor Commented:
I've requested that this question be deleted for the following reason:

Still getting errors on installation, as still don't know why this is doing this and closing the question
Deleting the question would not be appropriate because I did provide you with the answer to your original question/problem.  You then began to add additional questions relating to other module installations, which I also answered.

prerequisite module[DynaLoader] not known
prerequisite module(B) not known
Those are core modules which come with the base install of perl.  That error tells me that your perl installation is severely broken and will continue to give you problems.  You should completely uninstalled and reinstalled perl.  However, based on your limited knowledge of perl basics, I suggest that you find someone that you trust and is knowledgeable in perl and have them fix your perl installation before you brake it even further.
MachinegunnerAuthor Commented:
Yeah, I responded appropriately, due to the inactivity of the question.  I supplied a question and it wasn't replied to for over 2 weeks!  So closing this question.
Who cares if you supplied initial responses and it still didn't supply me with a solution.
It makes me aware of the unresponsiveness that YOU sir are not an expert in Perl and if I have any more questions, please do not answer any of them!  Some "Expert" you are.
You can't even spell right...
How many separate problems were you planning on tagging on and getting answered before you decide to close the thread?

Your original question was answered and you admitted that the answer given solved that problem.  The next problem after that should have been addressed in a new thread, but was still close enough to be answered here, which I did.  The last problem you posted indicated that your perl installation was broken and that should be addressed in a new separate thread.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now