how can I rebuild cpan?

Asked by William Haynes

server crashed and had to be reinstalled.

restored most files from backups

when access web server on this server, cpan modules cannot be found

how can cpan be reinstalled

we use local::lib option and cpan o conf init does not ask for this

bill

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
William Haynes
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Which Web server are you using please?

Revision history for this message
William Haynes (william-haynes) said :
#2

apache2 on Ubuntu 18.04

On 11/14/20 2:15 AM, actionparsnip wrote:
> Your question #694006 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/694006
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> Which Web server are you using please?
>

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Are you using cpan to install apache?

Revision history for this message
William Haynes (william-haynes) said :
#4

No.

When I click on a link on the web page and a program is run that needs a
perl module like Date::Calc installed using cpanm, the module cannot be
found. I now see that the module is installed because when I try to
reinstall it, I am told it is up-to-date.

Here is a sample of the error message I get when I click a link on a
webpage.

*Can't locate Date/Calc.pm in @INC (you may need to install the
Date::Calc module) (@INC contains: /home/coacho/lib
/home/coacho/perl5/lib/perl/5.18 /home/coacho/perl5/lib/perl/5.18.2
/home/coacho/perl5/share/perl/5.18 /home/coacho/perl5/share/5.18.2
/etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
/usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26
/usr/share/perl/5.26 /usr/local/lib/site_perl
/usr/lib/x86_64-linux-gnu/perl-base) at ./lib/cvt_date2day.pl line 13.
BEGIN failed--compilation aborted at ./lib/cvt_date2day.pl line 13.
*

I have just noticed that the directory noted /home/coacho/perl5*, *is
the production directory and not the directory used in our lab.*
*

How do I tell apache2 where to look for the cpan modules?

bill*
*

**

On 11/14/20 11:01 AM, actionparsnip wrote:
> Your question #694006 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/694006
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> Are you using cpan to install apache?
>

Revision history for this message
William Haynes (william-haynes) said :
#5

Maybe this will help

In the error below the @INC includes this
/home/coacho/perl5/lib/perl/5.18
this is defined on our production server but the perl5 library should be
/home/bill/perl5 or our lab server

I do not know where the /home/coacho/perl5/lib/perl/5.18 is coming from.

bill

On 11/14/20 6:45 PM, William Haynes wrote:
> Your question #694006 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/694006
>
> Status: Needs information => Open
>
> You gave more information on the question:
> No.
>
> When I click on a link on the web page and a program is run that needs a
> perl module like Date::Calc installed using cpanm, the module cannot be
> found. I now see that the module is installed because when I try to
> reinstall it, I am told it is up-to-date.
>
> Here is a sample of the error message I get when I click a link on a
> webpage.
>
> *Can't locate Date/Calc.pm in @INC (you may need to install the
> Date::Calc module) (@INC contains: /home/coacho/lib
> /home/coacho/perl5/lib/perl/5.18 /home/coacho/perl5/lib/perl/5.18.2
> /home/coacho/perl5/share/perl/5.18 /home/coacho/perl5/share/5.18.2
> /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
> /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26
> /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26
> /usr/share/perl/5.26 /usr/local/lib/site_perl
> /usr/lib/x86_64-linux-gnu/perl-base) at ./lib/cvt_date2day.pl line 13.
> BEGIN failed--compilation aborted at ./lib/cvt_date2day.pl line 13.
> *
>
> I have just noticed that the directory noted /home/coacho/perl5*, *is
> the production directory and not the directory used in our lab.*
> *
>
> How do I tell apache2 where to look for the cpan modules?
>
> bill*
> *
>
> **
>
> On 11/14/20 11:01 AM, actionparsnip wrote:
>> Your question #694006 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/694006
>>
>> Status: Open => Needs information
>>
>> actionparsnip requested more information:
>> Are you using cpan to install apache?
>>

Revision history for this message
William Haynes (william-haynes) said :
#6

Here is another piece of this puzzle.

When I login to the lab web server and run a Perl script from command
line, that I know will fail, the paths noted in INC in the error message
are correct. They show the local::lib values correctly.

bill

On 11/15/20 1:45 AM, William Haynes wrote:
> Your question #694006 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/694006
>
> You gave more information on the question:
> Maybe this will help
>
> In the error below the @INC includes this
> /home/coacho/perl5/lib/perl/5.18
> this is defined on our production server but the perl5 library should be
> /home/bill/perl5 or our lab server
>
> I do not know where the /home/coacho/perl5/lib/perl/5.18 is coming from.
>
> bill
>
>
>
> On 11/14/20 6:45 PM, William Haynes wrote:
>> Your question #694006 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/694006
>>
>> Status: Needs information => Open
>>
>> You gave more information on the question:
>> No.
>>
>> When I click on a link on the web page and a program is run that needs a
>> perl module like Date::Calc installed using cpanm, the module cannot be
>> found. I now see that the module is installed because when I try to
>> reinstall it, I am told it is up-to-date.
>>
>> Here is a sample of the error message I get when I click a link on a
>> webpage.
>>
>> *Can't locate Date/Calc.pm in @INC (you may need to install the
>> Date::Calc module) (@INC contains: /home/coacho/lib
>> /home/coacho/perl5/lib/perl/5.18 /home/coacho/perl5/lib/perl/5.18.2
>> /home/coacho/perl5/share/perl/5.18 /home/coacho/perl5/share/5.18.2
>> /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
>> /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26
>> /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26
>> /usr/share/perl/5.26 /usr/local/lib/site_perl
>> /usr/lib/x86_64-linux-gnu/perl-base) at ./lib/cvt_date2day.pl line 13.
>> BEGIN failed--compilation aborted at ./lib/cvt_date2day.pl line 13.
>> *
>>
>> I have just noticed that the directory noted /home/coacho/perl5*, *is
>> the production directory and not the directory used in our lab.*
>> *
>>
>> How do I tell apache2 where to look for the cpan modules?
>>
>> bill*
>> *
>>
>> **
>>
>> On 11/14/20 11:01 AM, actionparsnip wrote:
>>> Your question #694006 on Ubuntu changed:
>>> https://answers.launchpad.net/ubuntu/+question/694006
>>>
>>> Status: Open => Needs information
>>>
>>> actionparsnip requested more information:
>>> Are you using cpan to install apache?
>>>

Revision history for this message
William Haynes (william-haynes) said :
#7

Found problem...pilot error

Old script had path for production server embedded.

bill

On 11/15/20 2:35 AM, William Haynes wrote:
> Your question #694006 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/694006
>
> You gave more information on the question:
> Here is another piece of this puzzle.
>
> When I login to the lab web server and run a Perl script from command
> line, that I know will fail, the paths noted in INC in the error message
> are correct. They show the local::lib values correctly.
>
> bill
>
> On 11/15/20 1:45 AM, William Haynes wrote:
>> Your question #694006 on Ubuntu changed:
>> https://answers.launchpad.net/ubuntu/+question/694006
>>
>> You gave more information on the question:
>> Maybe this will help
>>
>> In the error below the @INC includes this
>> /home/coacho/perl5/lib/perl/5.18
>> this is defined on our production server but the perl5 library should be
>> /home/bill/perl5 or our lab server
>>
>> I do not know where the /home/coacho/perl5/lib/perl/5.18 is coming from.
>>
>> bill
>>
>>
>>
>> On 11/14/20 6:45 PM, William Haynes wrote:
>>> Your question #694006 on Ubuntu changed:
>>> https://answers.launchpad.net/ubuntu/+question/694006
>>>
>>> Status: Needs information => Open
>>>
>>> You gave more information on the question:
>>> No.
>>>
>>> When I click on a link on the web page and a program is run that needs a
>>> perl module like Date::Calc installed using cpanm, the module cannot be
>>> found. I now see that the module is installed because when I try to
>>> reinstall it, I am told it is up-to-date.
>>>
>>> Here is a sample of the error message I get when I click a link on a
>>> webpage.
>>>
>>> *Can't locate Date/Calc.pm in @INC (you may need to install the
>>> Date::Calc module) (@INC contains: /home/coacho/lib
>>> /home/coacho/perl5/lib/perl/5.18 /home/coacho/perl5/lib/perl/5.18.2
>>> /home/coacho/perl5/share/perl/5.18 /home/coacho/perl5/share/5.18.2
>>> /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1
>>> /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26
>>> /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26
>>> /usr/share/perl/5.26 /usr/local/lib/site_perl
>>> /usr/lib/x86_64-linux-gnu/perl-base) at ./lib/cvt_date2day.pl line 13.
>>> BEGIN failed--compilation aborted at ./lib/cvt_date2day.pl line 13.
>>> *
>>>
>>> I have just noticed that the directory noted /home/coacho/perl5*, *is
>>> the production directory and not the directory used in our lab.*
>>> *
>>>
>>> How do I tell apache2 where to look for the cpan modules?
>>>
>>> bill*
>>> *
>>>
>>> **
>>>
>>> On 11/14/20 11:01 AM, actionparsnip wrote:
>>>> Your question #694006 on Ubuntu changed:
>>>> https://answers.launchpad.net/ubuntu/+question/694006
>>>>
>>>> Status: Open => Needs information
>>>>
>>>> actionparsnip requested more information:
>>>> Are you using cpan to install apache?
>>>>

Revision history for this message
William Haynes (william-haynes) said :
#8

Old script had path for production server embedded.