Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've just installed Red Hat Enterprise Linux Desktop (v. 5 for 32-bit x86) on my laptop so I could do some c++ development for a class I'm taking, and I can't get the c++ compiler to work.
If I type
gcc server.cpp
(and yes, I realize once I get this working I will need more options like -o)
it responds
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
I ran "Add/Remove Software" to bring up the "Package Manager", and it says (among other things) that I have installed:
compat-gcc-34-3.4.6-4.I386
compat-gcc-34-c++-3.4.6-4.I386
compat-libstdc++-33-3.2.3-61.I386
gcc-4.1.2-44.eI5.I386
I've tried:
yum install g++
and it says "No package g++ available"
As you can probably tell, I know just enough Linux to be dangerous. Any help will be much appreciated!
If you are using RHEL5 then probably you have gcc-c++ on your cd/dvd. Use it to install the package.
Use rpm -qa | grep gcc to find if what already are installed.
That first one says c++ but maybe isn't quite the right one. Dunno.
I do have a DVD that I burned from the ISO file I got from the redhat site. How to transfer [whatever it is I need] from the DVD into my redhat install, I do not know.
compat-gcc-34-c++-3.4.6-4 is g++ version 3.4. You probably have a /usr/bin/g++34.. if version 3.4.6 is fine for you you can use that.
Else, on your RedHat DVD find RPMs for gcc-c++ and libstdc++-devel (and maybe more dependencies...). Install the RPMs with (as root):
rpm -ivh file1.rpm file2.rpm ...
If it needs more dependencies it will tell you.
As to whether version 3.4.6 is fine for me, I have no idea :-)
So ... this says I have g++ installed, but apparently I have missed a magical incantation somewhere along the line to let me actually use g++.
I have to set up some sort of alias that says that when I type g++, I actually mean /usr/bin/g++34? I vaguely remember that I used to know how to do that ...
And since I have /usr/bin/g++34, that means I don't have to find any RPMs on my DVD? If I still need to do that, I probably need help remembering how to mount a DVD (and/or search for RPMs on it).
You should have a gcc-c++ package available. Since you do not seem to it MAY indicate that yum is not set up quite right.
Edit: You do understand that in order to use RH's repos you MUST have a subscription (pay)? Assuming you have a subscription, solving this kind of issue is exactly what you are paying for.
RH is a little "funny" with their educational license(ok, about a lot of things). I am not sure what all is included, it MAY not include all the build tools. You might want to look at Centos. Centos is RHEL without the logos. It is free to download/update.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.