gcc will not execute, responds with 'no such file or directory' and 'no input file'
I am running Ubuntu 8.04 LTS on a Dell 1525n laptop. I don't know what I have to do to get gcc to execute. I have several utility programs written in 'C' that I want to compile on my laptop but each invocation yields 'no such file or directory' and 'no input file' error messages.
I have a desktop computer running Fedora 8 with KDE and I have never encountered problems of this sort. Gcc executes just fine and has starting with the first version of Linux I installed (Red Hat version 5 or something like that as I recall). I am strongly tempted to replace Ubuntu with Fedora 10 but don't want to run the risk of voiding the warranty on my laptop. To be candid, I'm not thrilled with Ubuntu but will try to muddle on. Thanks in advance for any and all advice. Keith Haslip |
Do you have the package build-essential installed?
|
Welcome to Linux Questions.
sudo apt-get build-essential will get you the most. Good luck ! |
build-essential is installed, still no joy
|
Well, try this command : gcc -v
If you get an output, gcc is probably working. Being no "search machine" , gcc needs to know, where the file to handle is located. Either with the command 1) ' cd /home/nckeecho/my_c_programs/ ' ( or wherever the source file is located. ) And next 2) ' gcc codename.c ' . Or the full path : gcc /home/nckeecho/my_c_programs/c_code.c Please use actual names for directories and files and without the quote marks. .... |
Thanks for all your help. Problem solved.
|
Quote:
|
.
Or may be click the blue "Thumb up" in the post with the solution ?? |
To be honest, I don't know exactly what fixed the problem.
I did the following: 1. Confirmed that build-essential was installed. 2. Executed gcc -v which pumped out some output. 3. Invoked gcc with one of my 'c' programs and it worked - I had an executable! That was the resulted I wanted, don't know why gcc worked the last time. Spoke too soon. This morning Ubuntu informed me updates were available so I installed them. Apparently something in the update package broke gcc so now I have to install the fixes that restore audio and, hopefully, fix my gcc problem. As I stated in an earlier post, I'm becoming less than thrilled with Ubuntu. |
Sorry for the delay of my reply. Problem is fixed. Fix probably occurred somewhere along the upgrade path from Ubuntu 8.04 to Xubuntu 16.04 LTS. Once again, thanks to all who responded.
|
All times are GMT -5. The time now is 11:04 PM. |