0

i tried to install perl modules IO::Tty,IO::Pty,Net::SSH2,Net::SSH::Perl....but i have failed to instal a single module.i tried to debug ,but unable to completely fix it.i came to know there is some issue with the compiler.as the below commands have given me the output which indicate something wrong.

which gcc
output 
/usr/bin/which: no gcc in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

whereis gcc
output
gcc:

and when i check the error logs after trying to instal the modules , i get the below mentioned error:

   [root@GTheGandalf ~]# cat /root/.cpanm/work/1439895011.19383/build.log
   ERROR: cannot run the configured compiler 'gcc'
(see conf/compilerok.log). Suggestions:
1) The compiler 'gcc' is not in your PATH. Add it
to the PATH and try again. OR
2) The compiler isn't installed on your system. Install it. OR
3) You only have a different compiler installed (e.g. 'gcc').
Either fix the compiler config in the perl Config.pm
or install a perl that was built with the right compiler
(you could build perl yourself with the available compiler).

Please help me to fix it as i am unable to execute perl scripts which have a dependency on the above mentioned modules.

user3407271
  • 25
  • 1
  • 11
  • Which Linux distro is this? Since you are using `yum` I assume Fedora or CentOS/RHEL. – MC10 Aug 18 '15 at 14:32

2 Answers2

4

The error message is self-explanatory.

Install gcc and add it to PATH.

Refer: Installing GCC guide

Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
  • when i am trying to install compiler using the command: yum install gcc getting the error as: Loaded plugins: product-id, security, subscription-manager Updating certificate-based repositories. Setting up Install Process No package gcc available. Error: Nothing to do........please help @Chankey Pathak – user3407271 Aug 18 '15 at 13:26
  • Install it manually, refer the guide which I've linked. Search google for tutorials specific to your distro. – Chankey Pathak Aug 18 '15 at 15:19
3

At least some of the modules you mention are implemented in C. You need the C compiler that what used to install your perl, namely gcc. Use your system's package manager (apt-get, yum, etc) to install it.

ikegami
  • 367,544
  • 15
  • 269
  • 518
  • when i am trying to install compiler using the command: yum install gcc getting the error as: Loaded plugins: product-id, security, subscription-manager Updating certificate-based repositories. Setting up Install Process No package gcc available. Error: Nothing to do........please help @ikegami – user3407271 Aug 18 '15 at 13:27
  • Perhaps you have the wrong package name. If you need help with your package manager, that's a separate question for [a different site](http://superuser.com/). – ikegami Aug 18 '15 at 13:52