Web Hosting Talk







View Full Version : Install new perl module


kaz
05-29-2002, 07:10 AM
Hi

Currently, i have a very weird problem. I have a plesk server and i used perldiver script to check what modules that is installed on the server.

Here, i try to install MIME::Base64

cpan> install MIME::Base64
MIME::Base64 is up to date.

It seem that MIME::Base64 had being installed and is updated to the latest version. However, perldiver.cgi doesn't show MIME::Base64 in the modules list.

Why is this so weird on plesk? How can make the modules appeared on the perldiver list?

priyadi
05-29-2002, 12:17 PM
You probably have more than one version of Perl installed on different location. Try locating the file Base64.pm, where is it installed on your system?

kaz
05-29-2002, 07:13 PM
Here's the result.

[root@www /root]# locate Base64.pm
/usr/local/psa/lib/perl5/site_perl/5.6.0/i386-linux/MIME/Base64.pm

Let me know what i should do next.

priyadi
05-29-2002, 11:57 PM
- what is the output of 'which perl'
- what's on the first line of perldiver?

Edit the first line of perldiver to the output of 'which perl'. You should be fine then. And you should do that to other scripts that need Base64.pm as well.

I don't know a lot about PSA. Maybe others can tell you which perl you need to use.

kaz
05-30-2002, 12:42 AM
which perl should i use? What is the location to my perl.. according to the above statement?

First line of perldiver
#!/usr/bin/perl

AcuNett
05-30-2002, 01:01 AM
type:

ls /usr/local/psa/lib/perl5/site_perl/ . There should only be one folder called 5.6.0.

priyadi
05-30-2002, 01:34 AM
It looks like PSA install a version of Perl inside its own directory. The other perl is probably installed by the operating system in /usr. I think you should use one that comes with the operating system. When executing perl, make sure you execute the one that comes with the operating system (/usr/bin/perl).

kaz
05-30-2002, 01:44 AM
Originally posted by AcuNett
type:

ls /usr/local/psa/lib/perl5/site_perl/ . There should only be one folder called 5.6.0.

There's one folder called 5.6.0 that i can see. What is my perl path now?



priyadi posted: It looks like PSA install a version of Perl inside its own directory. The other perl is probably installed by the operating system in /usr. I think you should use one that comes with the operating system. When executing perl, make sure you execute the one that comes with the operating system (/usr/bin/perl).

Perldiver was using /usr/bin/perl and it did not display the module that i install..

AcuNett
05-30-2002, 02:02 AM
That is the correct path to perl.

kaz
05-30-2002, 02:04 AM
what is the correct path i should use?

/usr/bin/perl on perldiver doesn't display the module that already being install.. :(

Website Rob
05-30-2002, 02:25 AM
There's one folder called 5.6.0 that i can see. What is my perl path now?
/usr/local/psa/

You can change perldiver.cgi to read "#!/usr/local/psa/" and see what it tells you. Printout before changing the shebang and after, to see the comparison. What others have mentioned though, is that it gets confusing with 2 seperate installs of Perl.

Is it not possible, to "tell" or "state specifically" where mods are to be installed. That would solve this problem nicely.

kaz
05-30-2002, 04:09 AM
I change from #!/usr/bin/perl to #!/usr/local/psa

I got an Internal Server Error.Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, and inform them of the time the error occurred and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.



If i use #!/usr/bin/perl ,perldiver will work.

I'm not sure where is the module is installed...

kaz
05-30-2002, 06:19 AM
There seem to be another perl!

When i try to install MIME::Base64 . It

se of uninitialized value in string ne at /usr/local/lib/perl5/5.6.1/CPAN.pm line 3202.
Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/5.6.1/CPAN.pm line 3068

and finally...MIME::Base64 is up to date.


it update usr/local/lib/perl5/5.6.1 and not my /usr/local/psa/lib/perl5.

How can make the server read as /usr/local/psa/lib/perl5 and not usr/local/lib/perl5/5.6.1

priyadi
05-30-2002, 07:18 AM
My god, you should really use only one instance of perl. I would leave the PSA perl alone, since PSA could depend on it. I suggest to stick with perl shipped with the operating system. Now, if you want to run perl from command line or from scripts, try using the full path: /usr/bin/perl.

kaz
05-30-2002, 08:36 AM
cpan is updating to usr/local/lib/perl5/5.6.1 and not /usr/local/psa/lib/perl5 ( use by all sites on server )

AcuNett
06-03-2002, 08:48 PM
I think running up2date caused PERL to be upgraded.

usr/local/lib/perl5
Just delete 5.6.1 from there and any other 5.6.1 folders.

Techark
06-03-2002, 09:30 PM
I am wondering about something on my server that maybe you could help me with.

I type ls /usr/local/lib/perl5/site_perl/
and get back 5.6.1 so for all intents and purposes I should have 5.6.1 as my version of perl correct?

But when I open cpanel I see Perl Version 5.006 and when cpanel updates I get this error..find: /usr/lib/perl5/5.6.1/: No such file or directory
which is true because there is a dir called 5.6.0..

So what is going on anyone got a clue? Do I need to delete some other versions of perl and how do I direct cpanel to update the proper dir?