Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-15-2009, 04:37 AM   #1
LQ Newbie
Registered: Oct 2008
Location: India
Distribution: Fedora9
Posts: 7

Rep: Reputation: 0
Question Unable to compile C++ programs.make:g++ command not found error.Error 127

Hello friends,I work on Fedora 9 and I'm unable to compile my c++ program using the make in the terminal as well as in the IDE-Anjuta.
although 'make' works fine with C programs,I get an error that g++ command is not found whenever I try it with C++ programs.

[prathamesh@localhost dsl]$ make ass7_2222
g++     ass7_2222.cpp   -o ass7_2222
make: g++: Command not found
make: *** [ass7_2222] Error 127

[prathamesh@localhost ~]$ cd ~/Documents/My_Programs/SE-4/dsl
[prathamesh@localhost dsl]$ g++ ass7_2222.cpp -o ass7_2222
bash: g++: command not found
I have the latest version of make installed on my computer.
[root@localhost ~]# yum install make
Loaded plugins: refresh-packagekit
Existing lock /var/run/ another copy is running as pid 11178.
Another app is currently holding the yum lock; waiting for it to exit...
Setting up Install Process
Parsing package install arguments
Package 1:make-3.81-12.fc9.i386 already installed and latest version
Nothing to do
I,then reinstalled make.
Still I'm unable to compile C++ programs..
Would anyone please help me out???Please..
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 03-15-2009, 05:20 AM   #2
Sergei Steshenko
Senior Member
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
'gcc' is not the same as 'g++', and the error message clearly says:

bash: g++: command not found
So, either g++ is not installed or it's not in $PATH.
Old 03-15-2009, 06:48 AM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
  • # yum -y install gcc-c++
will provide /usr/bin/g++


Last edited by knudfl; 03-15-2009 at 06:49 AM.
2 members found this post helpful.
Old 03-16-2009, 12:44 PM   #4
LQ Newbie
Registered: Oct 2008
Location: India
Distribution: Fedora9
Posts: 7

Original Poster
Rep: Reputation: 0
thanx..It worked..
I had 'make' installed...I assumed that it would come along with g++.The man pages certainly had many entries on g++.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc compile error (-lmysql: command not found) xface66 Programming 2 04-13-2007 09:00 AM
roo tail, make Error 127, /bin/sh: rman: command not found DraaX Linux - Desktop 4 08-28-2006 09:57 PM
make: Command not found, Error 127. I'm on Redhat Arild2 Linux - Newbie 3 10-30-2004 01:27 PM
make error : gtkdoc-scan: command not found Kanaflloric Linux - Software 1 08-25-2004 02:42 PM
make: cc: command not found make: *** [gzip.o]error 127 zyjk Linux - Newbie 5 02-08-2002 09:58 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration