Hi Alicia,
Glad you resolved the missing modules. As for your current problem, DBI is not
failing due to installation issues, but because a table that
export_sql.pl
expects to be present is missing, tag_index:
"DBD::mysql::st execute failed: Table 'basicdatacheck_ju01100809.tag_index'
doesn't exist at /usr/local/bin/
export_sql.pl line 82."
This table is built by
index_radtags.pl but only if you specify the "-t" flag,
So, if you add that flag in addition to '-c' you will get both a tag and catalog
index.
You can re-execute
index_radtags.pl as often as you like, it is non-destructive,
so no original data is changed when it runs.
julian
ps - for other users with a similar issue: MacPorts also provides packages for
most Perl modules if you want to skip using CPAN. Since Apple doesn't provide
packages, you have to use CPAN to install new modules to the Apple install of Perl.
On 7/27/13 2:42 AM, Alicia Mastretta wrote:
> Thank you Julian,
>
> Your answer pointed me in the right place, thank you. However, your solution
> didn't work straight forward, so below some details of what I end up doing in
> case is useful to others. Afterwards and a new error I got, this time more
> related to Stacks, hope you or someone can help.
>
> _I. What I did to solve Error: Can't locate Spreadsheet/WriteExcel.pm in @INC
> due to more than one Perl installation in Mac:_
>
> I have a MacPorts installation which at some point installed Perl. It also means
> that it was using MacPorts' cpan, so cpan Spreadsheet::WriteExcel was installing
> the module under /opt/local. The line that worked to invoke cpan was:
>
> sudo /usr/bin/cpan Spreadsheet::WriteExcel
>
> Sorry to bother you with Mac-Perl issues, I chose the wrong time in life to
> switch to Mac (and I regret it so much).
>
>
> _II. Error when running export_sql.pl_
> <
https://groups.google.com/forum/#!searchin/stacks-users/export_sql.pl/stacks-users/uj7-rqNvzOE/zPK_zQEfsSYJ>
> For those guys it worked after a week, and seems you may have done changes to
> the code since then to speed things up.
>
> Should be patient and wait or is not worth it because "DBD::mysql::st execute
> failed" and "DBD::mysql::st fetchrow_hashref failed:" are showing up?
>
> Thank you so much,
>
> Alicia
>
>
>
>
>
> On Friday, July 26, 2013 7:07:57 AM UTC+1, Julian Catchen wrote:
>
> Hi Alicia,
>
> You have two versions of Perl installed, one provided by Apple and installed in
> /usr/bin (with libraries under /Library and /System among other places) and the
> other installed via macports, or another package system. If you install
> packages
> through cpan, you will get Apple's Perl and the packages will go in the Apple
> install paths (/Library or /System, etc). If you install Perl module packages
> via your macports (or similar) it will go under /opt/local/lib.
>
> This is not a problem related to what Stacks is doing, the Perl interpreter
> running the Stacks script is where the system paths are stored.
>
> You can either install the DBI modules using macports so that they are also
> located under /opt/local, or you can execute cpan to install WriteExcel under
> the Apple hierarchy:
>
> sudo /usr/bin/perl -MCPAN -e shell
>
> Also, if you run
export_sql.pl <
http://export_sql.pl> with the explicit
> interpreter you want you can
> change which set of modules it looks for:
>
> /usr/bin/perl /usr/local/bin/export_sql
> (gives you the Apple version)
>
> /opt/local/bin/perl /usr/local/bin/export_sql
> (gives you the macports version)
>
> Best,
>
> julian
>
> On 7/25/13 3:53 AM, Alicia Mastretta wrote:
> > Hi all,
> >
> > I have yet another episode of the Mac nightmare.
> >
> > When I tried to run
export_sql.pl <
http://export_sql.pl> I got the
> following error:
> >
> > Can't locate Spreadsheet/WriteExcel.pm in @INC (@INC contains: /sw/lib/perl5
> > /sw/lib/perl5/darwin /Library/Perl/5.12/darwin-thread-multi-2level
> > /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level
> > /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3
> > /System/Library/Perl/5.12/darwin-thread-multi-2level
> /System/Library/Perl/5.12
> > /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level
> > /System/Library/Perl/Extras/5.12 .) at /usr/local/bin/
export_sql.pl
> <
http://export_sql.pl> line 31.
> > BEGIN failed--compilation aborted at /usr/local/bin/
export_sql.pl
> <
http://export_sql.pl> line 31
> > at the top of /usr/local/bin/
export_sql.pl <
http://export_sql.pl>
> >
> > But that makes the script not being able to find DBI as stated in this
> error:
> >
> > Can't locate DBI.pm in @INC (@INC contains: /sw/lib/perl5
> /sw/lib/perl5/darwin
> > /opt/local/lib/perl5/site_perl/5.12.3/darwin-multi-2level
> > /opt/local/lib/perl5/site_perl/5.12.3
> > /opt/local/lib/perl5/vendor_perl/5.12.3/darwin-multi-2level
> > /opt/local/lib/perl5/vendor_perl/5.12.3
> > /opt/local/lib/perl5/5.12.3/darwin-multi-2level /opt/local/lib/perl5/5.12.3
> > /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl .) at
> > /usr/local/bin/
export_sql.pl <
http://export_sql.pl> line 30.