g++ cannot run

Asked by Chaoxin

I have installed g++ compiler but when I typed in g++ in the terminal, I received an error message of no such file or command.

I have double checked that g++ is installed and located in /usr/bin/

I have also browse to that folder and tried to run g++ inside the folder of /usr/bin, but it did not work.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcc-defaults Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

if you run:

sudo apt-get install build-essential

Does your source code compile then?

Can you help with this problem?

Provide an answer of your own, or ask Chaoxin for more information if necessary.

To post a message you must log in.