C compiler, build-essential, gcc

Asked by Wesly

i have a problem with my c compiler, my terminal displays
"no acceptable C compiler found in $PATH"
i know i should install build-essential, but it doesn't find it when i type
"sudo apt-get install build-essential"
and i have updated and upgraded, so i downloaded build-essential and did
"./configure" it said that it need dpkg, so i downloaded that also and did "./configure " but when i did that it said I didn't had a C compiler, my problem to begin with.
I have searched on the web for 2 days now and still haven't found a solution, my package manager is up to date, but when i configure:
checking for gcc... no
cheking for gawk... no
checking for cc... no
and i have a gcc on my pc, it isn't in his usual map but in /usr/share/doc/gcc...., but i added this to the $PATH. So I have run out of option and forums to search, so i hope you guys know something.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Ralph Janke
Solved:
Last query:
Last reply:
Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#1

Can you issue the following commands and paste the results here:-

dpkg -l "gcc"

dpkg -l "build-essential"

cat /etc/apt/sources.list

Revision history for this message
Wesly (wesly-van-eycken) said :
#2

dpkg -l "gcc": No packets found of gcc (I translated it from dutch)

dpkg -l "build-essential": No packets found of gcc

cat /etc/apt/sources.list:
# Line commented out by installer because it failed to verify:
#deb http://be.archive.ubuntu.com/ubuntu/ dapper main restricted
# Line commented out by installer because it failed to verify:
#deb-src http://be.archive.ubuntu.com/ubuntu/ dapper main restricted

## Major bug fix updates produced after the final release of the
## distribution.
# Line commented out by installer because it failed to verify:
#deb http://be.archive.ubuntu.com/ubuntu/ dapper-updates main restricted
# Line commented out by installer because it failed to verify:
#deb-src http://be.archive.ubuntu.com/ubuntu/ dapper-updates main restricted

## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
# deb http://be.archive.ubuntu.com/ubuntu/ dapper universe
# deb-src http://be.archive.ubuntu.com/ubuntu/ dapper universe

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://be.archive.ubuntu.com/ubuntu/ dapper-backports main restricted univ erse multiverse
# deb-src http://be.archive.ubuntu.com/ubuntu/ dapper-backports main restricted universe multiverse

# Line commented out by installer because it failed to verify:
#deb http://security.ubuntu.com/ubuntu dapper-security main
# Line commented out by installer because it failed to verify:
#deb-src http://security.ubuntu.com/ubuntu dapper-security main
# deb http://security.ubuntu.com/ubuntu dapper-security universe
# deb-src http://security.ubuntu.com/ubuntu dapper-security universe

Revision history for this message
Best Ralph Janke (txwikinger) said :
#3

You have no repositories at all enabled. Remove the #-characters in all the line where deb follows it.

After this you need to refresh the knowledge about the depositories with

sudo apt-get update

It should then download package lists and store them in your system.

Then you can install the necessary packages, i.e.

sudo apt-get install gcc
sudo apt-get install build-essential

I hope this helps.

Revision history for this message
Alan Pope 🍺🐧🐱 πŸ¦„ (popey) said :
#4

Worth also doing:-

sudo apt-get dist-upgrade

After all that, or let the graphical update manager update your machine.

Revision history for this message
Wesly (wesly-van-eycken) said :
#5

Thanks for your tips, i removed de # characters and had to change the http in ftp somtimes and it worked!
i could update and upgrade and the build-essential is installed.

Thanx

Revision history for this message
Wesly (wesly-van-eycken) said :
#6

User confirmed that the request is solved.

Revision history for this message
Rickr765 (rickr765) said :
#7

The problem is NOT SOLVED. I complained about this in 6.10 and it's still not fixed, in fact it's worse! In 7.10 I can't run apt-get because it tells me that I am not root! And I see no way to become root! GRRR