Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Unable to find PDL/pdldoc.db

by Xilman (Hermit)
on May 11, 2020 at 10:20 UTC ( [id://11116663]=perlquestion: print w/replies, xml ) Need Help??

Xilman has asked for the wisdom of the Perl Monks concerning the following question:

Hello all, perhaps you may be able to help. I am trying to RTFM for PDL. PDL::Doc is installed but its database appears not to be. This is what happens:


$ pdldoc -a slice
Unable to find PDL/pdldoc.db in /etc/perl:/usr/local/lib/x86_64-linux-gnu/perl/5.30.0:/usr/local/share/perl/5.30.0:/usr/lib/x86_64-linux-gnu/perl5/5.30:/usr/share/perl5:/usr/lib/x86_64-linux-gnu/perl/5.30:/usr/share/perl/5.30:/usr/local/lib/site_perl:/usr/lib/x86_64-linux-gnu/perl-base
can't open database 1, scan docs first at /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc.pm line 468.
	PDL::Doc::ensuredb(PDL::Doc=HASH(0x564539105b98)) called at /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc.pm line 596
	PDL::Doc::search(PDL::Doc=HASH(0x564539105b98), "m/slice/", ARRAY(0x564538a7a6c8), 1) called at /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc/Perldl.pm line 189
	PDL::Doc::Perldl::search_docs("m/slice/", ARRAY(0x564538a7a6c8), 1) called at /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc/Perldl.pm line 166
	PDL::Doc::Perldl::aproposover("slice") called at /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc/Perldl.pm line 174
	PDL::Doc::Perldl::apropos("slice") called at /usr/local/bin/pdldoc line 49

What have I done wrong, and how may I fix it?

Replies are listed 'Best First'.
Re: Unable to find PDL/pdldoc.db
by syphilis (Archbishop) on May 11, 2020 at 12:05 UTC
    What have I done wrong, and how may I fix it?

    UPDATE: Duh ... what follows below is pretty much useless. The error message already tells us what $fi is.
    It's actually 1 though it should be the fully qualified path to pdldoc.db.
    Sorry, I don't have any other brilliant ideas to offer at the moment :-(

    I don't exactly know the answer to either question.
    I would try changing /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc.pm from:
    while (my $fi = pop @{$this->{File}}) { open IN, $fi or barf "can't open database $fi, scan docs first";
    to:
    while (my $fi = pop @{$this->{File}}) { print "\$fi: $fi\n"; open IN, $fi or barf "can't open database $fi, scan docs first";
    (The last line of the above excerpts is, of course, the "line 468" that's throwing the error.)
    Next, re-run pdldoc -a slice which should then tell you what $fi is.

    With that change made, on my Windows installations of PDL, it reveals:
    $fi: C:/_64/perl526_630/site/lib/PDL/pdldoc.db
    which places pdldoc.db in the same directory as Doc.pm, and therefore suggests that you would want to be seeing:
    $fi: /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/pdldoc.db
    Where we go from there depends upon the result that you get ... assuming you have the permissions required to edit files in /usr/lib .....

    Also, does /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/pdldoc.db exist ?

    UPDATE: When I said "I would try changing /usr/lib/x86_64-linux-gnu/perl5/5.30/PDL/Doc.pm", I meant that's what I would do if I was using a perl in /usr/lib that was throwing that error.
    Of course, I would in fact never even use a perl located in that (or any other system) directory.

    Cheers,
    Rob
Re: Unable to find PDL/pdldoc.db
by perlfan (Vicar) on May 12, 2020 at 02:41 UTC
    How did you install PDL? Can you tell us more about the environment?
Re: Unable to find PDL/pdldoc.db
by Anonymous Monk on May 11, 2020 at 11:31 UTC
    Hi the error says thing to try can't open database 1, scan docs first So somehow scan docs
Re: Unable to find PDL/pdldoc.db
by etj (Deacon) on Apr 22, 2022 at 12:41 UTC
    Without knowing how the OP installed PDL, it's not possible to diagnose.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11116663]
Approved by hippo
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found