HOw to install Perl with thread support on Centos 6.3

Issues related to applications and software problems
Post Reply
nunkstop
Posts: 4
Joined: 2012/10/31 09:27:23

HOw to install Perl with thread support on Centos 6.3

Post by nunkstop » 2012/10/31 09:34:47

Hi everybody
I have installed Centos server 6.3 on workstation, now I want to install Perl with thread supported on my server
Last night I have install perl, and cpanel, but I want to install some modules, need Perl with thread supported.

I try many way but seem it can not install on my system.

I try this way :


[quote]wget http://www.cpan.org/src/perl-5.8.8.tar.gz tar -xzvf stable.tar.gz cd perl-5.8.8 ./Configure -Dprefix=/usr -Dusethreads make make test make install[/quote]

I got error at command " make " and cannot install, after search and try another way to remove "command-line" and it ok with make command, but at "make test" it got another error

SO anyone could help me solve this problem?

Thank you!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HOw to install Perl with thread support on Centos 6.3

Post by TrevorH » 2012/10/31 10:06:24

As far as I can see the default perl as shipped with CentOS 6 already supports threads

[code]
$ cat pthr.pl
#!/usr/bin/perl -w

my $can_use_threads = eval 'use threads; 1';
if ($can_use_threads) {
print "Can use threads\n";
} else {
print "Cannot use threads\n";
}
$ perl pthr.pl
Can use threads
$
[/code]

Even more important, CentOS 6 uses perl 5.10.1 and you are trying to back level that with a source install to 5.8.8 which is definitely not advisable.

nunkstop
Posts: 4
Joined: 2012/10/31 09:27:23

Re: HOw to install Perl with thread support on Centos 6.3

Post by nunkstop » 2012/10/31 12:47:28

so now, how can I resolve this problem? Could you guide me?
Thank you!

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HOw to install Perl with thread support on Centos 6.3

Post by TrevorH » 2012/10/31 12:59:56

I don't see the problem - can you explain why

[code]
yum install perl
[/code]

doesn't do what you want?

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

HOw to install Perl with thread support on Centos 6.3

Post by gerald_clark » 2012/10/31 13:06:31

You are running cPanel.
cPanel has its own perl, and a bunch of other things that it replaces.
You are paying for cpanel support. You should use it.

nunkstop
Posts: 4
Joined: 2012/10/31 09:27:23

Re: HOw to install Perl with thread support on Centos 6.3

Post by nunkstop » 2012/10/31 13:14:03

Thank for response
The problem is : I need to install some module on my server, but it need perl support thread, It rase error that perl has not been configure support thread on my system. How can I enable thread support? Or I contact with cpanel to support this?

Sorry I'm newbie in Centos...

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: HOw to install Perl with thread support on Centos 6.3

Post by TrevorH » 2012/10/31 15:12:54

On a genuine CentOS system running `rpm -q perl` should say perl-5.10.1-127.el6.x86_64. If your output from this is significantly different then it's very possible that cpanel has replaced it with their own version (it should at least say perl-5.10.1-something). If that's the case then you need to talk to cpanel about it. The CentOS supplied version has thread support enabled already.

wired420
Posts: 1
Joined: 2013/01/22 13:10:55
Contact:

Re: HOw to install Perl with thread support on Centos 6.3

Post by wired420 » 2013/01/22 13:18:09

cPanel will not help you with this. This is generally a bad idea for a production environment. Either intentionally or unintentionally it can lock up your system with a bad script.

During the Perl build it may seem as if the build has locked up for up to 30 minutes at a time. This is a good one to start and walk away from and come back later.

If you really want to do this though this is how.

As root of course.

# cd /usr/local/src/
# wget http://layer1.cpanel.net/perl588installer.tar.gz
# tar -vzxf perl588installer.tar.gz
# cd perl588installer

Use your preferred editor to open the file called: install

Search for ./configure.gnu

You will need to add the following flag which I will put on the next line to the appropriate lines for your system.

-Dusethreads

# sh install


After quite some time you will have the correct version of perl built for cPanel with threading enabled. On another note. cPanel will complain every time it checks perl's version or updates perl modules.

Any other method of this will result in cPanel ceasing to function correctly as cPanel builds its own version of perl.

Post Reply