Installing perl5.14 failed

Hi,

While installing perl5.14 on my Linux box its failing with c compiler issue.

below is the error message.

Use which C compiler? [cc]
./trygcc: line 10: cc: command not found
Uh-oh, the C compiler 'cc' doesn't seem to be working.
./trygcc: line 25: gcc: command not found
./checkcc: line 10: cc: command not found
Uh-oh, the C compiler 'cc' doesn't seem to be working.
You need to find a working C compiler.
Either (purchase and) install the C compiler supplied by your OS vendor,
or for a free C compiler try http://gcc.gnu.org/
I cannot continue any further, aborting.

later I downloaded the gcc-6.3.0 and tried to install I have got the below error.

[root@esx-mind-1 gcc-6.3.0]# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libcilkrts support... yes
checking for libitm support... yes
checking for libsanitizer support... yes
checking for libvtv support... yes
checking for libmpx support... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/tmp/gcc-6.3.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
[root@esx-mind-1 gcc-6.3.0]#

Please help me resolve this issue.

Thanks,
Muzaffar

Please post the output of the following commands, exactly as displayed, running as the root user:

echo $"PATH"
which gcc
which cc 
alias | grep cc

cc is UNIX speak for the C compiler, and some software expects it to point to a real compiler. Unless you have a very tiny Linux install like ARM, there is probably a C compiler somewhere in the /usr/bin directory.

Hi.

What distribution of Linux are you using?

Usually, the safest method for installing utilities and applications is from the distribution repository with specific tools such as apt-get (Debian, Ubuntu, etc), yum/dnf (RedHat, etc.), zypper (SuSE), and so on.

Best wishes ... cheers, drl

I think Jim meant to ask for the output from the command:

echo "$PATH"

instead of:

echo $"PATH"
1 Like

Hi,

Please find the output of the command below.

[root@esx-mind-1 ~]# echo $"PATH"
PATH
[root@esx-mind-1 ~]# which gcc
/usr/bin/which: no gcc in (/root/gcc-6.3.0/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@esx-mind-1 ~]# which cc
/usr/bin/which: no cc in (/root/gcc-6.3.0/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
[root@esx-mind-1 ~]# alias | grep cc
[root@esx-mind-1 ~]#

I am using RHEL 6.3 Linux

[root@esx-mind-1 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Kernel \r on an \m

[root@esx-mind-1 ~]# uname -r
2.6.32-431.el6.x86_64
[root@esx-mind-1 ~]#

Why are you building from sources instead of installing binary packages?

You're on a binary distro, you should be using binaries, so your package manager can manage your packages.

You certainly can't compile anything without a compiler, anyway, no even a compiler. (gcc has an obscure "bootstrap" process for that which people are lucky to avoid.)

I don't have yum repository configured in my Linux box, can you please point me out on how to resolve this issue. As this is killing my time :frowning: and I am unable to proceed with other things

Thanks,
Muzaffar

Hi.

I don't understand how you could keep your system updated without a repository.

  1. How did you install the system?
  2. Is your system registered with RedHat?
  3. Please run this command and copy/paste the output: yum repolist[

For comparison, on a system like:

OS, ker|rel, machine: Linux, 2.6.32-358.23.2.el6.centos.plus.x86_64, x86_64
Distribution        : CentOS 6.4 (Final) 

I get output that includes lines like:

repo id            repo name                                              status
base               CentOS-6 - Base                                         6696
centosplus         CentOS-6 - Plus                                           74
contrib            CentOS-6 - Contrib                                         0
epel               Extra Packages for Enterprise Linux 6 - x86_64         12230
extras             CentOS-6 - Extras                                         63
updates            CentOS-6 - Updates                                       808
repolist: 19871

Best wishes ... cheers, drl

1 Like

I have installed it on ESX machine as VM client and my system is not registered with RHN network.

[root@esx-mind-1 ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
[root@esx-mind-1 ~]#

Hi.

It looked like back in 2012 in thread http://www.unix.com/linux/206565-shared-library-error.html\#post302730053 you did have a subscription, and you knew how to use yum .

I think your options now are:

  1. Install packages from the installation media, keeping in mind that they may be old.
  2. Try to create a local repository, see 8.4.6. Creating a Yum Repository
  3. Use CentOS.
  4. Try to install CentOS repostories in your RHEL system, some guidance might be helpful from Installing CentOS packages on Red Hat Enterprise Linux - Michael Cutler's personal website -- but in the past few years CentOS was folded into RedHat, so I don't know whether this is still possible.
  5. Wait or search for other answers here or on the net.

For some more discussion along this line wait for other responses here, and/or see rhel6 - Do I need a RHEL subscription to install packages? - Server Fault

The most on-point comment that I found if you stay with an unregistered system is The wasted time would cost a lot more than the subscription!

Good luck ... cheers, drl

Compiling them by hand is not the answer either. You will be left with a spectacularly messed up system.

Yes definitely I know how to use yum, and I had installed fedora then and it was very easy to install packages using yum in fedora, but in Redhat it will ask for subscription

  1. May be i'll try creating local repository and try to configure yum and then install the packages.
  2. I need to use RHEL 6.4 only as I need to build and automation frame work for my testing environment for that RHEL 6.4 is mandatory.

Thanks for you kind help. I will try and update in the ticket.

Cheers :b:

Regards,
Muzaffar