HOw to install Perl with thread support on Centos 6.3

Issues related to applications and software problems

HOw to install Perl with thread support on Centos 6.3

Postby 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 :


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


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!
nunkstop
 
Posts: 4
Joined: 2012/10/31 09:27:23

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

Postby 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: Select all
$ 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
$


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.
User avatar
TrevorH
Forum Moderator
 
Posts: 12754
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Postby nunkstop » 2012/10/31 12:47:28

so now, how can I resolve this problem? Could you guide me?
Thank you!
nunkstop
 
Posts: 4
Joined: 2012/10/31 09:27:23

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

Postby TrevorH » 2012/10/31 12:59:56

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

Code: Select all
yum install perl


doesn't do what you want?
User avatar
TrevorH
Forum Moderator
 
Posts: 12754
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

HOw to install Perl with thread support on Centos 6.3

Postby 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.
gerald_clark
 
Posts: 9233
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

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

Postby 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...
nunkstop
 
Posts: 4
Joined: 2012/10/31 09:27:23

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

Postby 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.
User avatar
TrevorH
Forum Moderator
 
Posts: 12754
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Postby 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.
wired420
 
Posts: 1
Joined: 2013/01/22 13:10:55


Return to CentOS 6 - Software Support

Who is online

Users browsing this forum: No registered users and 1 guest