gcc: command not found

Hello, I was wondering what I was doing wrong with my terminal. Because everytime I would try to compile my c program I made with gedit it keeps saying, “bash: gcc: command not found”. I downloaded all the libraries for it but still cant find the command. Thanks!

I’m running opensuse 11.0.

the program code i was trying to run which was very basic:
#include <stdio.h>
main()
{
printf("hello, world
");
}

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sure it’s installed?

rpm -qa | grep -i gcc

If so, where is the binary?

rpm -ql gcc | grep bin

Good luck.

warren957 wrote:
> Hello, I was wondering what I was doing wrong with my terminal. Because
> everytime I would try to compile my c program I made with gedit it keeps
> saying, “bash: gcc: command not found”. I downloaded all the libraries
> for it but still cant find the command. Thanks!
>
> I’m running opensuse 11.0.
>
> the program code i was trying to run which was very basic:
> #include <stdio.h>
> main()
> {
> printf("hello, world
");
> }
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI4k/m3s42bA80+9kRArCcAJ9vOdzNm/ueW62UqDE+1FeBCzsyugCgiHuK
s+W8JpwC8nV+VQhc1shQkf0=
=g3ub
-----END PGP SIGNATURE-----

i got libgcc43-4.3.1_20080507-6.1
as for the the second command it said:
“package gcc grep is not installed”
“package bin is not installed”
where would i go to get those packages?
Thanks for all the help.

You have not installed gcc. You have only installed libgcc.
You should be able to install gcc from the DVD or if you have the repositories configured then run this command.

sudo zypper install gcc
  • Thejaswi Raya

Thanks! it works fine now.