LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-10-2008, 11:30 AM   #1
Pikidalto
Member
 
Registered: Apr 2008
Location: North Versailles, PA
Distribution: Ark Linux
Posts: 63

Rep: Reputation: 15
/bin/sh: CC : command not found


I need to use the cc command, but it is looking for CC. I tried switching the Makefile line from CC to cc, but it still says command not found. I tried softlinking CC to cc, and still a no go. Any help resolving this appreciated.

EDIT: In case you're wandering what I'm trying to compile, it's libvolume_id so I can compile HAL so that I can compile KDE4.1ALPHA.

Last edited by Pikidalto; 05-10-2008 at 11:32 AM.
 
Old 05-10-2008, 12:04 PM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
You might want to take a look in your Makefile and see how CC is defined in it; by the way, CC is, sometimes at least, C++ (which is, on my system anyway, /usr/bin/c++ which is a symbolic link to /usr/bin/g++). It's normal on some systems that cc is the C compiler and CC is the C++ compiler. In your Makefile there may be a set of definitions for CC and you could change which one is active (not commented out).

Otherwise, locate g++ or c++ then
Code:
CC=g++
export CC
and see if that works for you.
 
Old 05-10-2008, 12:42 PM   #3
Pikidalto
Member
 
Registered: Apr 2008
Location: North Versailles, PA
Distribution: Ark Linux
Posts: 63

Original Poster
Rep: Reputation: 15
So... something like:
Code:
CC=/usr/bin/g++
export CC
?

Unfortunately, doing this returns the same error
 
Old 05-10-2008, 12:47 PM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Unfortunately, doing this returns the same error
Do you have any compilers installed? Find out with
which commandname
Eg:
Code:
which cc
which CC
which g++
which c++
 
Old 05-10-2008, 01:17 PM   #5
sea-bass
LQ Newbie
 
Registered: Dec 2006
Posts: 14

Rep: Reputation: 0
Hi There

Have you installed GCC?

rpm -qil gcc
Name : gcc Relocations: (not relocatable)
Version : 4.1.2 Vendor: CentOS
Release : 14.el5 Build Date: Fri 09 Nov 2007 10:05:54 PM GMT
Install Date: Mon 31 Dec 2007 12:21:50 AM GMT Build Host: builder6
Group : Development/Languages Source RPM: gcc-4.1.2-14.el5.src.rpm
Size : 10011902 License: GPL
Signature : DSA/SHA1, Tue 20 Nov 2007 07:11:26 PM GMT, Key ID a8a447dce8562897
URL : http://gcc.gnu.org
Summary : Various compilers (C, C++, Objective-C, Java, ...)
Description :
The gcc package contains the GNU Compiler Collection version 4.1.
You'll need this package in order to compile C code.
/usr/bin/c89
/usr/bin/c99
/usr/bin/cc
/usr/bin/gcc

--SeaBass
 
Old 05-10-2008, 01:39 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Sorry folks, cc is no g++, cc is usually a link to gcc.
g++ has a cousin too : c++

#ln -s gcc cc should solve your problem.
 
Old 05-11-2008, 01:56 AM   #7
Pikidalto
Member
 
Registered: Apr 2008
Location: North Versailles, PA
Distribution: Ark Linux
Posts: 63

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tredegar View Post
Do you have any compilers installed? Find out with
which commandname
Eg:
Code:
which cc
which CC
which g++
which c++
I have cc, g++, and c++ installed, but CC isn't installed.

And yes, GCC is installed, it got installed when I installed Ark's devel-core.
 
Old 05-11-2008, 02:03 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
See posts #2 and #6
Maybe "CC" needs to be a link to /usr/bin/g++
What I am saying here is that CC maybe isn't a completely different program, but it is another name for one you already have.
Reading the Makefile should help you understand what it expects CC to be.
 
  


Reply



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
/bin/bash: root: command not found pridefc Red Hat 5 12-12-2006 07:09 PM
roo tail, make Error 127, /bin/sh: rman: command not found DraaX Linux - Desktop 4 08-28-2006 09:57 PM
/bin/sh: cmp: command not found - when compile 2.6.15 again . -=Graz=- Slackware 7 05-05-2006 08:39 PM
Error when starting up snort: bash:!/bin/sh/usr/local/bin/snort :Eent not found cynthia_thomas Linux - Software 1 11-11-2005 02:59 PM
/bin/sh: anaconda-ks.cfg: command not found Buttercups Linux - General 1 08-07-2003 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:22 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
Open Source Consulting | Domain Registration