Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-15-2012, 11:14 PM
|
#1
|
Member
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240
Rep:
|
compiling C programs in fedora
Hi all,
I have a dell inspiron with windows on it and running fedora 16 on VM. The issue is that, i wrote a c program and when i was about to compile I came to know that it didn't had gcc or cc installed. Do I have to install fedora on disk so as to write C or C++ programs?
Please advise on this.
Chelux,
nm
|
|
|
07-15-2012, 11:23 PM
|
#2
|
Member
Registered: Jan 2009
Location: Coimbatore, India
Distribution: rhel
Posts: 49
Rep:
|
u have to install gcc package before compile c programs.
Check whether gcc installed or not using the below command.
rpm -q gcc (or) rpm -qa | grep gcc
The above command didn't give any output means, u have to install gcc package from the OS media.
|
|
|
07-15-2012, 11:27 PM
|
#3
|
LQ Guru
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573
|
If the VM has internet access you can just use yum to install gcc
yum install gcc
should do it
|
|
|
07-17-2012, 10:59 PM
|
#4
|
Member
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240
Original Poster
Rep:
|
rmugunthan,
yup it said the package is not installed. Need to install it somehow.
Regards,
nm
|
|
|
07-18-2012, 12:17 AM
|
#5
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,680
|
Better yet ,instead of just hopping that yum will pull ALL the needed prerequisites from just asking to install gcc
AND the odds and ends needed that are NOT prerequisites of gcc .
on fedora it is advised to install the development groups
Code:
su -
yum grouplist
--- then from that list install the development tools ---
yum groupinstall " Development Tools" "Development Librarys"
|
|
1 members found this post helpful.
|
07-18-2012, 03:32 AM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520
|
.. And the absolute minimum to get a working gcc :
1) su <password> 2) yum install gcc-c++
Then the 'gcc' required packages will be install too :
namely glibc-devel, glibc-headers, ( + glibc-common ).
.
|
|
|
07-19-2012, 12:11 AM
|
#7
|
Member
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240
Original Poster
Rep:
|
John & knudfl,
thank you for your responses, but whatever you have suggested, will it work on Fedora 16 running on VM 8.
regards,
nm
|
|
|
07-19-2012, 12:30 AM
|
#8
|
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,680
|
we both gave you the instructions for fedora
except you WILL need the " -" after the "su"
on fedora you will need to use "su -" most of the time
|
|
|
07-19-2012, 12:30 AM
|
#9
|
Member
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825
Rep: 
|
Quote:
John & knudfl,
thank you for your responses, but whatever you have suggested, will it work on Fedora 16 running on VM 8.
|
As long as you have an internet connection or access to the install DVD. "yum" is a like Apple AppStore for Linux. It exist since a decade and work fine.
|
|
|
07-19-2012, 12:39 AM
|
#10
|
Member
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 240
Original Poster
Rep:
|
elv13,
thank you for your response, i have used yum before but didn't know that it can be used with the install CD/DVD. Thanks again i will do it, will post again if found anything beyond my knowledge.
regards,
nm
|
|
|
All times are GMT -5. The time now is 07:28 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|