ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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).
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.
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
cpp
libgcc
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...
Try some mirrors near to you. After you found one, thats suitable browse throug the ftp directory until you find something like ftp.suse.com /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 ftp.suse.com 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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.