Linux - SoftwareThis 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
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.
Hey, this problem just keeps manifestinig itself in many forms from several levels. I keep posting my findings with the problem but am only getting a few replies out of about 200 views. I really need help, this just isnt making sense to me. Maybe I have no idea what Im doing, either way, im loosing my patience.
The problem is that when I try to compile source files it says it can't find my compiler (nor can I). I tried the command $whereis / gcc and got a list of about 30 different locations. Im too new at using linux to even begin guessing the path I need to include in $PATH (I think the object is to put the executable gcc program into $path once its located, but I don't know).
So then I tried to install the gcc packages from the distro installation disk but got the response that 'the packages were already installed'.
OK, let's recap and summerize here. gcc cannot be located during ./configure. I look for gcc and find 30 possible locations. I try to reinstall gcc but am denied because gcc is already installed. The problem, gcc is installed but cannot be located by whatever system is calling it with the ./configure process.
Maybe I dont have the proper gcc packages. I only found two on my linux installation disk. They are:
Type which gcc. If gcc is the name of an available executable (in the path somewhere) the location of the file will be returned.
But yes, I see you have your gcc packages installed. Go to /usr/bin and do an ls -l | grep gcc to see what's what and what's not. Files in this directory can be executed from anywhere on the file system, so if you have a file called only "gcc" here and you can't execute it you probably have a problem with your $PATH, like you said.
Do an echo $PATH and look at the list returned. The directories are colon-separated (a ":" between different paths), and /usr/bin should be in there.
If you do NOT have a file called simply gcc in /usr/bin I suggest you symlink one of the available gcc compilers to it - you probably have gcc-2.95 and gcc-3.2 there. I don't run Mandrake so I'm not familiar with the naming conventions used. Anyhow, if you want the 3.2.2 release to be used as standard gcc (to compile most programs) simply create a symlink to it - example below. I assume the dir is /usr/bin and the installed 3.* compiler executable is called gcc-3.2.
$ cd /usr/bin
$ su
<enter root password>
# ln -s gcc-3.2 gcc
# exit
$ which gcc
This is exactly the point. At some point I already looked for it in usr/bin and there is no exectable called gcc there or anything that even clostly guggests gcc. Also, just for kicks, I ran your commands and the ls -l|grep gcc gave me nothing and the 'In' command was not recoginized.
My path does include usr/bin so it is looking there. The only idea I have is that the compiler is in a totally off the wall location. If this is the case, I can't imagine being able to locate it.
Would there be any way to try to install them again and be denied because "package is already installed" but weed through the computers process of determining that and maybe find the location it has listed for it? Of course the only listings it could possibly have is in $PATH. I guess i could manually search through every location listed in $PATH for anything that remotely resembles gcc or a compiler. though my knowledge of naming conventions for this would be minimal. That sounds fun! I know, im digging here.
Could the compuer think its installed, even though it isn't? If so, is there any way to force a re-installation? Just incase this might help (hopefully this means more to you then me), this is what I get when I try to run any ./configure file-
./configure for gcc package:
Configuring for a i686-pc-linux-gnuoldld host.
Created "Makefile" in home/username/gcc/gcc-3.3.1 using "mt-frag"
./configure : line 8: cc: command not found.
****The command 'cc -o conftest -g conftest.c' failed.
****You must set the environment variable CC to a working compiler.
Originally posted by mjkramer and the 'In' command was not recoginized.
It's l, as in lowercase L, not an uppercase i.
If you have an /opt directory it may be worth looking there. It is possible (although I won't say probable) that you have a bin directory under it where the executables hide. If you don't find it there, we'll have to whip out the heavy weaponry: find.
This can take all day if you have a slow hard disk, but it's worth a shot. First cd to /opt and then type: find . -name gcc*
This will search all files in the current directory and recursively through the subdirs and list all files that begin with "gcc".
If you don't find it there, go to the /usr dir and repeat the same command. I really do hope you find it because I'm quickly running out of suggestions here. LOL
I haven't used RPM-based distros in a while and I never were that good with them, so I think I'll pass on trying to answer your questions. But do try a man rpm. I think there should be some switch you could use to list the files a package would install (something along the lines of rpm --list packagename.rpm, although I'm sure it's not that simple ).
sorry I'm using this post,but i have same problem and i searched and found this one close to my problem.
And I'm newbie also.MDK 9.1.
So I typed:
[wannalearnlinux@localhost wannalearnlinux]$ which gcc
which: no gcc in (/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/home/wannalearnlinux/bin)
Sorry (for someone) stupid question,but :
Does it mean that there is no Gcc installed?
Looks like it isnot installed to me,just for sure.
Because I need Gcc for Chkrootkit,and when I try install Chkrottkit it says soemthing like "gcc: can't found command" .
I posted it and was helped I need Gcc,which I thought I had installed,but probably didn't.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.