Forum › Forums › New users › New Users and General Questions › [SOLVED] gcc doesn’t work
Tagged: gcc fault
- This topic has 12 replies, 4 voices, and was last updated Apr 16-4:32 am by paulineb.
-
AuthorPosts
-
April 14, 2020 at 3:18 pm #34707Member
paulineb
hello, i downloaded a tarball and run the configure file,
this is what i got.checking whether the C compiler works… no
configure: error: in `/home/pab/na’:
configure: error: C compiler cannot create executableswhat happened and what could i do?
thank you for any helppb
d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg
- This topic was modified 3 years ago by paulineb.
- This topic was modified 3 years ago by paulineb.
pb
d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg
April 14, 2020 at 3:28 pm #34711Member
Xecure
::Hello,
i downloaded a tarball and run the configure file,
Meaning you downloaded a .tar file that conatined… a program? tar files can contain images, videos, codefiles… More info is needed.
hecking whether the C compiler works… no
configure: error: in `/home/pab/na’:
configure: error: C compiler cannot create executablesSo it contained a program that needs to be compiled. Do you require special libraries to compile it? Maybe you need to install some things first so that you can correctly compile this program. Take a look at the instructions for your program, and the required program/libraries needed.
- This reply was modified 3 years ago by Xecure. Reason: spelling
antiX Live system enthusiast.
General Live Boot Parameters for antiX.April 14, 2020 at 3:37 pm #34714Member
paulineb
::thanks for replying.
yes, tarball with the source of nasmpb
d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg
April 14, 2020 at 3:45 pm #34717Member
Xecure
::If you can connect to the internet you can install nasm from debian repository
sudo apt-get install nasmantiX Live system enthusiast.
General Live Boot Parameters for antiX.April 14, 2020 at 3:46 pm #34718Forum Admin
anticapitalista
::sudo apt install nasmsaves a lot of headaches.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 14, 2020 at 4:02 pm #34724Member
paulineb
::thanks, it worked!
but does the trick mean that gcc can’t be fixed?
pb
d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg
April 14, 2020 at 4:07 pm #34725Member
Xecure
::thanks, it worked!
Sometimes it is better to first see if the program is in the repo. As anticapitalista says, saves a lot of time.
but does the trick mean that gcc can’t be fixed?
It just means that you are missing libraries or other stuff, or that you don’t have permissions (I don’t know for your exact case). If I want to compile stuff, I first need to have the correct stuff installed. I have compiled some programs and kernel modules and used gcc, make, and other programs which I first had to install (and all compilations worked, so gcc has no problem at least for me). Normally the instructions will tell you what you need to install for the compilation to work.
- This reply was modified 3 years ago by Xecure. Reason: spelling
antiX Live system enthusiast.
General Live Boot Parameters for antiX.April 14, 2020 at 4:33 pm #34731Member
paulineb
::j have just now tried to compile the ambitious “hello world” program with this result
a.c:1:9: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^~~~~~~~~pb
d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg
April 15, 2020 at 12:59 am #34745Member
Shaun Holt
::Have you done a search to find where stdio.h is stored on your drive?
Should be ——– /usr/include/stdio.h
- This reply was modified 3 years ago by Shaun Holt.
April 15, 2020 at 1:32 am #34747Member
Xecure
::a.c:1:9: fatal error: stdio.h: No such file or directory
You may need to install build-essential for missing libraries
sudo apt install build-essentialIf after installing it still doesn’t work, reinstall both gcc and build-essential
sudo apt install --reinstall gcc build-essentialantiX Live system enthusiast.
General Live Boot Parameters for antiX.April 15, 2020 at 4:37 am #34752Member
paulineb
::a.c:1:9: fatal error: stdio.h: No such file or directory
You may need to install build-essential for missing libraries
sudo apt install build-essentialIf after installing it still doesn’t work, reinstall both gcc and build-essential
sudo apt install --reinstall gcc build-essentialthanks, it worked and it allowed me to compile package from source.
strange that the downloaded distro has gcc preinstalled without librariespb
d2Vsa2pnd3JlaW9ld2FyaWpob2FpHnJaxaCg
April 15, 2020 at 5:32 am #34757Forum Admin
anticapitalista
::The libraries are not really used by most users (I reckon the vast majority do not compile) so take up unnecessary space, especially since Debian upstream has so many packages ready for install via apt.
- This reply was modified 3 years ago by anticapitalista.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 16, 2020 at 4:32 am #34797Member
paulineb
-
AuthorPosts
- You must be logged in to reply to this topic.