Problem installing perl modules

aranes

Registered
Jul 14, 2011
1
0
51
Hi all,
I'm having problems installing any perl module via cpanel. It always outputting this error
Code:
Testing connection speed...(using fast method)...Done
Ping:4 (ticks) Testing connection speed to mirrors.servercentral.net using pureperl...(14025.00 bytes/s)...Done
Ping:4 (ticks) Testing connection speed to cpan.belfry.net using pureperl...(12600.00 bytes/s)...Done
Ping:4 (ticks) Testing connection speed to mirror.cogentco.com using pureperl...(12120.00 bytes/s)...Done
Ping:4 (ticks) Testing connection speed to cpan.mirror.clemson.edu using pureperl...(12040.00 bytes/s)...Done
Ping:3 (ticks) Testing connection speed to mirror.team-cymru.org using pureperl...(11800.00 bytes/s)...Done
Five usable mirrors located
Ping:1 (ticks) Testing connection speed to 70.87.220.252 using pureperl...(28950.00 bytes/s)...Done
Ping:1 (ticks) Testing connection speed to 72.233.42.250 using pureperl...(28950.00 bytes/s)...Done
Ping:1 (ticks) Testing connection speed to 75.126.236.226 using pureperl...(28900.00 bytes/s)...Done
Three usable fallback mirrors located
Fetching http://mirrors.servercentral.net/CPAN/index.html (connected:0).......(request attempt 1/12)...Resolving mirrors.servercentral.net...(resolve attempt 1/65)......connecting to [email protected]00%......request success......Done
Mirror Check passed for mirrors.servercentral.net (/index.html)
Checking C compiler....Could not locate an executable "gcc" binary....Done
 ** Unrecoverable Error **
The C compiler is not functional and auto repair failed.
Perl module installs require a working C compiler.
Please repair the C compiler and try again.
 **************************
Would anyone know where is problem and how can i fix it?

Thanks a lot.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Hello aranes,

Please check that your /tmp and / are not full on the machine:

Code:
df -kh
If they are not full, then try the following:

Code:
mv /root/.cpanel /root/.cpanel.bak
/scripts/checkperlmodules --full --force
Thanks!
 

MattLG

Registered
Aug 2, 2011
1
0
51
I am seeing this exact same error on two completely independent hosting companies. This is clearly a bug in cpanel which has been introduced in one of the recent updates.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Actually, if cPanel > Perl Modules area isn't allowing perl modules to be installed, the host is likely disallowing compiler access, preventing installing perl modules entirely at the user level.

WHM > Compiler Access

This sets whether users can use compilers or not. If they are disabled from using a compiler, then the C compiler won't work to install perl modules in cPanel. Your host would simply need to enable compiler access, or they should remove the option to install perl modules in cPanel for accounts.
 

frenzal

Registered
Aug 17, 2011
1
0
51
Hello aranes,

Please check that your /tmp and / are not full on the machine:

Code:
df -kh
If they are not full, then try the following:

Code:
mv /root/.cpanel /root/.cpanel.bak
/scripts/checkperlmodules --full --force
Thanks!
I'm having the same problem unfortunately, after upgrading cpanel. I came across it after trying to fix the broken language files in cpanel. Google only takes me here and one other page when researching this broken C compiler.

This is the error I get:

Could not compile test....Done
** Unrecoverable Error **
The C compiler is not functional and auto repair failed.
Perl module installs require a working C compiler.
Please repair the C compiler and try again.
**************************
 

theuruguayan

Active Member
PartnerNOC
Jul 6, 2003
37
0
156
ACtually. is not the compilers.

Check the permissions of the /tmp folder.

In this particular cases it was set incorrectly so it was not able to create temporary files.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
ACtually. is not the compilers.

Check the permissions of the /tmp folder.

In this particular cases it was set incorrectly so it was not able to create temporary files.
For others who may experience the same problem, /tmp should be owned by "root" and have 1777 permissions. The permissions can be set via:

Code:
# chmod 1777 /tmp
Thank you.
 

deydod

Registered
Apr 27, 2010
3
0
51
Hi

I'm still having this problem.
- Security Center >> Compiler Access -> Enabled
- /tmp folder has the right permissions
- /tmp is not full

- /scripts/checkperlmodules --full --force -> Still errors
- /scripts/upcp --force -> Still errors

Any ideas?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Please submit a ticket at this point using the link in my signature or in WHM > Support Center > Contact cPanel area. Please post the ticket number here for us to follow up on it afterward. Thanks!
 

quizknows

Well-Known Member
Oct 20, 2009
1,008
87
78
cPanel Access Level
DataCenter Provider
I fixed this on a server recently due to /root/tmp/ being a symlink to /tmp/. /tmp/ is set noexec (which may or may not matter), but when I removed the symlink from /root/tmp to /tmp, then did mkdir /root/tmp/ to leave a 755 root:root dir there, the "working C compiler" error went away

Your error said it couldn't locate a gcc binary; I know this is an old post, but you'd want to run 'which gcc' and see if it returns something like /usr/bin/gcc. If it doesn't, you've got some bigger problems, and should use your package manager to re-install gcc. I did this on a centOS system with RPM/YUM by doing:

rpm -e --nodeps gcc --justdb
yum install gcc

you should then be able to run 'gcc -v' and get output like:
[[email protected] ~]# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
 
Last edited: