LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-24-2008, 12:23 AM   #1
hash123
LQ Newbie
 
Registered: Jul 2008
Posts: 11

Rep: Reputation: 0
Unhappy make : cc : command not found


I am trying to build a sample kernel module called to print "hello world" .
I want to generate a .ko file from the .c file

so i type the command
% make hello

I get the following error.

% make : cc : command not found
% make : *** [hello] Error 127

I think that this error might be because may be cc compiler might not be installed .
but how do i check whether it is installed or not ?
and in case i find that it is not installed then what do i do and how do i install it?
 
Old 07-24-2008, 12:52 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
the process varies depending on your distro
for Fedora 8 or 9 it would be
~]# yum install kernel-devel
just install the your currant kernel source packages
and the dev tools for your distro
 
Old 07-24-2008, 01:01 AM   #3
pgroover
Member
 
Registered: Sep 2005
Location: Colorado
Distribution: Ubuntu
Posts: 55

Rep: Reputation: 16
As John VV pointed out, it all depends on your distro. If you're using Ubuntu, you could just do the following:
sudo apt-get install build-essential

Alternatively, you could simply do this to just get the compiler:
sudo apt-get install gcc
 
Old 07-24-2008, 01:43 AM   #4
hash123
LQ Newbie
 
Registered: Jul 2008
Posts: 11

Original Poster
Rep: Reputation: 0
yum localinstall gcc

i am working on fedora core 8 installed as a guest OS on a vmware server

I tried using yum install gcc
but it give the following error:

Could not retrieve mirrorlist http://mirrors.fedoraproject.org/mir...ra-8&arch=i386 error was [Errorno 4]IOError: <urlopen error (-2, 'Name or service not known')>
Erro: Cannot retrieve repository metadata (repomd.xml)for repository : fedora.
Please verify its path and try again.
 
Old 07-24-2008, 01:56 AM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
as to the error
1) mirror may be down , it happens try tomorrow
2) wrong mirror , there has been a change it the last 7 months
[code]
su -
gedit /etc/yum.repo.d/fedora.repo
mine
Quote:
[fedora]
name=Fedora $releasever - $basearch
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[fedora-debuginfo]
name=Fedora $releasever - $basearch - Debug
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

[fedora-source]
name=Fedora $releasever - Source
failovermethod=priority
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY
from Applications / add/remove just put a check in
Development / Development Libraries
Development / Development Tools
if using Gnome
Development / GNOME software Development
Development / Legacy Software Development
and install
 
Old 07-24-2008, 03:47 AM   #6
hash123
LQ Newbie
 
Registered: Jul 2008
Posts: 11

Original Poster
Rep: Reputation: 0
when i tried to save the fedora.repomine file ,it gives the error "File Not Found"
 
Old 07-24-2008, 04:05 AM   #7
hash123
LQ Newbie
 
Registered: Jul 2008
Posts: 11

Original Poster
Rep: Reputation: 0
hey well i could find the file in the yum.repos.d directory
but the file already contains the same code which u gave.
and so when i install it it gives the same error.
 
Old 07-24-2008, 10:38 AM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Is the networking set-up right for your VM? Can you contact the
host OS, can you ping anything on the network?
 
Old 07-24-2008, 10:59 AM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,093

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
also you can try uncommenting the baseurl in fedora.repo and fedora_update.repo
Code:
#baseurl=http://do...
-- to ---
baseurl=http://do...
can you access google.com or yahoo.com while in the vm environment
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make command not found sharadshankar Ubuntu 1 01-16-2006 12:18 PM
'make' command not found X_ArchAngel Slackware 2 11-17-2004 03:03 AM
make - command not found LordFrancis Linux - Newbie 4 10-25-2004 10:57 AM
make: command not found lel800 Linux - Newbie 9 01-27-2004 03:27 PM
make: cc: command not found make: *** [gzip.o]error 127 zyjk Linux - Newbie 5 02-08-2002 09:58 AM


All times are GMT -5. The time now is 11:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration