Solved

How to get GCC on Debian

Posted on 2013-10-26
3
506 Views
Last Modified: 2013-10-26
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
0
Comment
Question by:AmyL
3 Comments
 
LVL 3

Accepted Solution

by:
netmaster1355 earned 500 total points
ID: 39602934
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
 
LVL 13

Expert Comment

by:Daniel Helgenberger
ID: 39603088
Please make sure build-essential is installed:
sudo apt-get install build-essential

Open in new window

0
 

Author Closing Comment

by:AmyL
ID: 39603299
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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux hostname change 2 73
Linux VM 6 90
Delete a folder on a linux computer on a regular basis 10 37
how to print sub line with  sed /awk /perl in bash file 11 26
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question