Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today installed CentOs 6.4 fresh new on my workstation.

I wanted to install g++. With my surprise I didn't succeed by using

 yum install gcc-g++

The thing is that even by doing a search I don't get any result.

 # No package available
 yum search g++

On top of that I installed successfully gcc.

Do you know whether I am using the wrong package name or what should I do?

share|improve this question
up vote 66 down vote accepted

Have you tried:
yum install gcc-c++

share|improve this answer
    
..silly me..thanks a lot – Abruzzo Forte e Gentile Sep 27 '15 at 8:47
    
Wow... silly me, too. That's c++ not g++! – Joseph Jun 29 at 20:20

I was successful with on CentOS 6.4

    yum install gcc-c++.x86_64
share|improve this answer
1  
Also worked for me on CentOS 7. – Steve HHH Nov 11 '14 at 0:45

One thing I have realized is that many packages give that error because package names are usually different than most tutorials out there on the net.

Normally when I get stuck I just use this command:

yum list | grep <packagename>

This gets a list of all packages like the one we are searching for and it always lists the full name which we should use to install the package.

Also the <packagename> is case-sensitive, geoip and GeoIP will return different list of packages.

share|improve this answer
    
You can make the match insensitive by using grep -i <packagename> instead. – Parthian Shot Feb 25 at 16:42

I ran into this post because installing node with regular gcc-c++ it will complain;

but to workaround the issue you can install gcc-g++ from Linuxsoft: Software Repository

curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo

rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern

yum install -y devtoolset-3

scl enable devtoolset-3 bash

and node will be happy !

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .