-   Programming (
-   -   can't compile C pgm in SUSE 9.1 (

gjo 09-20-2004 07:27 AM

can't compile C pgm in SUSE 9.1
hi, i'm new to SUSE
i have done c pgm in redhat (for compile i use 'cc' command and execute "./a.out")
but i don't know how to compile and execute C pgm in SUSE . I try cc, gcc commands but an error produce like"bash: bad command"

I checked if it installed or not. i have found through YaST it is installed correctly.
i try "cpp" command but it will just print the pgm preceeded by some lines

Plz anyone help me immediatly

Mara 09-20-2004 08:24 AM

The compiler name is 'gcc'. If it produces such an error it means it's not installed or you don't have it in your PATH. You can search the whole disk for it:
locate gcc
or, if you don't have locate or its database
find / -name gcc
(but this can take some time).

Does the executable exist?

gjo 09-20-2004 08:44 AM

thanks ...i will check it today

paulsm4 09-21-2004 12:35 AM

Use Yast, Install/Remove software
Hi -

Mara is absolutely correct: if bash can't find it, you either don't have it in your path or it isn't installed.

Assuming you have "root" privilege, the first place to look is "Yast, Install/Remove Software". Do a "search" for gcc. If it's not installed, just check the blank box (to install it), click [Apply] ... and feed YaST your CD's when prompted.

'Hope that helps .. PSM

gjo 09-22-2004 03:30 AM

still problem
hi, i'm using SUSE 9.1 personal . i installed it in 2 machines. both have the same proble.

hi mara, i checked using this command:

find / -name gcc

the rusult was

find:/media/cdrom:No medium found

then i insert the suse installation cd and again execute the same command. then it display:

find:.changed during execution of find

Hi paulsm, i have root privilage.
i open the window install/remove s/w in Yast, and type gcc in search box
after search it displays the right side top
both are preceeded by a chekbox with checkmark.
And also find the bottom of window the description
cpp-the gccpreprocesor
and version(3.3.3-41),location(cpp-3.3.3-41.i586.rpm) media No(1 0), license etc...

Now wat shall i do?. Give me a solution...

DiWi 09-22-2004 03:51 AM


The SuSE personal edition does not include any working compilers, like gcc, but you can install them via network connection from a ftp mirror.

In order to activate the ftp server as installation source do the following steps:

Open a browser and go to suses homepage. Go to "home user", download, SuSE Linux, find mirror:

Try some mirrors near to you. After you found one, thats suitable browse throug the ftp directory until you find something like /pub/suse/i386/9.1 . Remember server and path to the 9.1 release
Now open Yast and add a new installation source. The type is ftp, the server is the directory is /pub/suse/i386/9.1. After you click add Yast tests the source, if it is a valid source.
Now open add/remove software in Yast. If you do this the first time after adding a new installation source it will take some several minutes for downloading the available package list.
Then you can simply add the following packages gcc, make, ...
After Yast installed this packages and updated the links, you should be able to open a shell and gcc will be in the path. Try which gcc and he will tell you where it finds the executable, if it is in the path setting

Please run the update from yast everytime you installed new packages, because these could be outdated.


paulsm4 09-22-2004 12:53 PM

Thanx, DiWi.

I knew the compilers weren't installed by default (by and large, a Good Thing), but I *didn't* know that the "Personal" edition didn't contain *any* compilers.

Thank you again!

gjo 09-23-2004 08:58 AM

Hi .I don't have internet connection in my home. So i can't install it diretly from the net. Is there any way to download the compiler and installed it from the harddisk.

again i need help from you

DiWi 09-23-2004 09:11 AM

no problem:

go to any suse mirror and change to the 9.1 distribution directrory
you need from the suse/i586 directory the following packages:


and maybe some more, I'm not completely shure....


gjo 09-24-2004 03:01 AM

thankyou, i'm going to install these files.

i have doubt, why the yast displays that list when i search gcc?

digdug 10-25-2004 12:00 PM

yast problem?
like "gjo" I need to install gcc on my suse 9.1 personal linux (I need to recompile kernel to get my wireless network adapter working.) I have the 4 gcc packages on CD and also copied to HD. The 1st time I tried to install (just the main gcc rpm) I got a conflict warning - I bailed thinking I should install the the whole set of 4 at once. But now when I use yast>install/remove SW, Yast2 starts, I get a very brief message "Reading package info;1 moment please..." - that goes away, yast2 goes away - nada. Install/remove still finds packages when I point to the original SUSE install CD but gets lost when pointing to the gcc CD or HD dir.

All times are GMT -5. The time now is 10:33 PM.