Guest Anna Ves Posted October 14, 2006 Report Share Posted October 14, 2006 (edited) I have recently installed Ubuntu. It seems quite a good way of escaping from Windows for the first time. But I have a problem... The main reason for me installing a Linux-based operating system is because I want to practise my skills in programming using c language. But I cannot make gcc work from the command line of the terminal :( Do I have to install anything else? Edited October 16, 2006 by Anna Ves Quote Link to comment Share on other sites More sharing options...
JonEberger Posted October 15, 2006 Report Share Posted October 15, 2006 i agree with your assesment of ubuntu. ubuntu seems very 'window-user desiring escape'-friendly. it's a good solid distribution. 1. are you sure you have it installed? 2. what happens when your just type 'gcc'? does it give you errors concerning whether you have made a proper call or not? 3. how do you call the compiler? is it similar to gcc -o file.out file.c (or g++ if you're compiling c++ code)? 4. if the compiler is being called and you're getting some other errors, perhaps it's in your c/c++ code. either way, post your output errors here. the more information you provide us the more you'll intrigue us or increase the probability of someone knowing the solution immediately. good luck!! Jon Quote Link to comment Share on other sites More sharing options...
Guest Anna Ves Posted October 15, 2006 Report Share Posted October 15, 2006 I guess that gcc is not installed. Because when I try to compile a file the message I get is gcc: command not found. Yes, I type gcc -o file.out file.c, and this is the error message I get. Do I have to include a path in the .bashrc file in order for gcc to be inluded? (Because I have found a folder in my home directory that is called libs/gcc. I assume that this means that gcc exists in my system, wrong?) Yes, I admit I am a bit (...a huge bit) inexperienced as far as linux is concerned... If gcc is not installed, how can I install it? Download a gz file, unzip it and then? Does Linux work with setup files similar to those that windows use? Thank you in advance. I might not see or understand things that are obvious for you, but it's just because of ignorance. I want to learn. Thanks :D Quote Link to comment Share on other sites More sharing options...
paul Posted October 15, 2006 Report Share Posted October 15, 2006 sudo apt-get install gcc make build-essential That should fix you up Quote Link to comment Share on other sites More sharing options...
shengchieh Posted October 16, 2006 Report Share Posted October 16, 2006 Just so you know, You can get gcc on window. I used to do this. http://www.cs.virginia.edu/~lcc-win32/ (lcc-win32 for window OS) The other way is to use cygwin on windwo. http://www.cygwin.com/ Sheng-Chieh p.s. not trying to push you to window. linux rules. Quote Link to comment Share on other sites More sharing options...
JonEberger Posted October 16, 2006 Report Share Posted October 16, 2006 Hi Anna, Your posts seems pretty knowledgeable. Every one of us was hugely inexperienced at some point and time. The biggest things is that you're obviously very willing to learn and aren't embarassed to ask questions. Enjoy, Jon Quote Link to comment Share on other sites More sharing options...
Guest Anna Ves Posted October 16, 2006 Report Share Posted October 16, 2006 First of all thank you all for your support. @Jon: Thank you for amking me feel so much at home @shengchieh: I have already tried cygwin. It is a really good solution, but it's time for me to ecsape from window. Thank you very much though. @paul: sudo apt-get install gcc make build-essential That should fix you up Yes, that totally fixed me up! I now have gcc installed and working. But could you please explain to me how sudo command worked in this case? I'll try to "man" a few things and "google" a few other.... but I still have a long long way to go... THANK YOU!!!!! Quote Link to comment Share on other sites More sharing options...
paul Posted October 16, 2006 Report Share Posted October 16, 2006 sudo: su = switch user do = do :) .. duh! so ... sudo = switch user, then do (something) in this case apt-get install ..... sudo assumes you want to run something as root edit: in most cases sudo will require a password, the exception however is ubuntu. They have built the OS around the use of sudo (and its counter parts .. gnome-su, kde-su etc etc) it is basically a safe-ish way of allowing root access to your OS for a brief period of time. This will not work on Mandriva, or gentoo, redhat, debian (the list goes on) with out further configuration .. its just the way ubuntu does things Quote Link to comment Share on other sites More sharing options...
Artificial Intelligence Posted October 16, 2006 Report Share Posted October 16, 2006 Build-essential is a metapackage which allow you to quickly getting the basic tools for compiling etc. The metapackage installs libc6-dev, gcc (v4:4), g++ (v4:4), make and dpkg-dev. All the packages are on the CD but not installed by default. You can also use aptitude instead of apt-get. The favor of using aptitude instead of apt-get is that aptitude is better to "solve" dependecy problems thean apt-get. Also if you install something with aptitude it can "remember" which extra libs/files/etc. that application/libs downloaded to make the it work. Eg: sudo aptitude install build-essential now if you use apt-get to remove build-essential (sudo apt-get remove build-essential) it will only remove build-essential and not the dependeny that comes with it. Instead use the aptitude to remove build-essential; sudo aptitude remove build-essential Aptitude will remove build-essential and its dependency (libc6-dev, gcc (v4:4), g++ (v4:4), make and dpkg-dev). Off-topic: Only 9 days to Ubuntu Edgy will be official released :Insert 100 of dancing bananas: Quote Link to comment Share on other sites More sharing options...
Guest Anna Ves Posted October 17, 2006 Report Share Posted October 17, 2006 Thank you very much! Thanks to your help I have already managed to use sudo myself! And it's only a week or less since I installed ubuntu! Great Community! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.