How to get GCC on Debian

I did:
sudo apt-get install build-essential

Then I did:
whereis gcc make

The output was: /usr/lib/gcc

I then did
cd /usr/lib/gcc

..and tried:
gcc -lX11 prog.c -o prog ./prog.c

And the output was;
Bash: gcc command not found

Please help. I just want to get to the point that I can compile c code (for X).

Thanks,
Amy
AmyLAsked:
Who is Participating?
 
netmaster1355Connect With a Mentor Commented:
i think your installation is not complete. if it succeed, you should have have /usr/bin/gcc and other directories as well (in whereis result).

verify installation with gcc -v on command line. it should show you version. if you got "gcc command not found", you should try to install it again and check logs during installation to find problem.
0
 
Daniel HelgenbergerCommented:
Please make sure build-essential is installed:
sudo apt-get install build-essential

Open in new window

0
 
AmyLAuthor Commented:
You were correct. It appears as though Debian 5 is officially "dead", and my installation was attempting to contact an ftp server no longer in use. I upgraded Debian and it works fine now.
0
All Courses

From novice to tech pro — start learning today.