LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-13-2006, 03:49 PM   #1
Rexxars
LQ Newbie
 
Registered: Dec 2005
Location: Kristiansand, Norway
Posts: 6

Rep: Reputation: 0
Unhappy Can't compile - GCC/G++ doesn't seem to be properly installed


Hi.

I've recently purchased a dedicated server with Debian that was setup by.. well, not me
It seems to be unable to compile. I tried to compile Apache, which failed.
To try and figure out the problem, I made a simple hello-world type C app and tried to compile it:

Code:
> gcc -o test a.cpp
gcc: installation problem, cannot exec `cc1plus': No such file or directory
Not sure what's wrong. I've tried "apt-get install build-essential" (read that from some debian FAQ) and got the following result:

Quote:
> apt-get install build-essential
Reading Package Lists... Done
Building Dependency Tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 3:3.3) but it is not going to be installed
E: Broken packages
I've tried to apt-get libc6-dev, which in turn needs libc6, which "is already the newest version" according to apt-get. This is very, very frustrating. Any ideas?

I know I can apt-get apache and such, but I'd rather try to compile it all myself (I'm trying to learn here)
 
Old 03-13-2006, 04:02 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Please post your /etc/apt/sources.list file. Could be that you're mixing and matching repositories...
 
Old 03-13-2006, 05:01 PM   #3
Rexxars
LQ Newbie
 
Registered: Dec 2005
Location: Kristiansand, Norway
Posts: 6

Original Poster
Rep: Reputation: 0
"You cannot post URLs to other sites until you have made at least 5 posts."
- Argh. Replace xx with tt in the following:

Code:
deb hxxp://ftp2.de.debian.org/debian/ stable main
deb-src hxxp://ftp2.de.debian.org/debian/ stable main

deb hxxp://security.debian.org/ stable/updates main
Some updates (got some help from the #debian irc channel):

Quote:
> dpkg -l libc6 | tail -1
ii libc6 2.3.5-1 GNU C Library: Shared libraries and Timezone
Seems that somehow I have etch's libc6 and sarge's sources.

I have no idea how this happened.
Is there a way to fix this without reinstalling everything?

Thanks again for any help.
 
Old 03-13-2006, 05:26 PM   #4
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
I would say to try apt-get dist-upgrade, but I'm not sure if that will downgrade packages or not. Also, look at /etc/apt/apt.conf and see if that package is pinned to etch...
 
Old 03-14-2006, 01:49 AM   #5
Rexxars
LQ Newbie
 
Registered: Dec 2005
Location: Kristiansand, Norway
Posts: 6

Original Poster
Rep: Reputation: 0
apt.conf doesn't exist, theres a file in apt.conf.d/ however, but it doesnt contain anything like that.

Quote:
> apt-get dist-upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
Calculating Upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
:/
 
Old 03-14-2006, 10:53 AM   #6
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Try apt-get install --reinstall libc6 (or whatever the libc6 package is called.
 
Old 03-14-2006, 11:57 AM   #7
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
and for the same price you can do:
Code:
apt-get install libc6-i686
 
Old 03-14-2006, 04:46 PM   #8
Rexxars
LQ Newbie
 
Registered: Dec 2005
Location: Kristiansand, Norway
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks, installed libc6-i686 and reinstalled some of the other libc packages and it just ended up working

Thanks again to all who helped!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Help. can't compile kernel module properly 3-1415 Programming 3 06-01-2005 02:56 AM
gcc installed but not working properly cylaxzene Linux - General 4 01-30-2005 12:30 PM
You do not have PyGtk-2 properly installed flamah Linux - Newbie 5 01-06-2005 12:13 PM
Upgrading GCC properly. jon_k Linux - Software 2 08-22-2004 11:58 PM
font not installed properly mw55309 Linux - Newbie 0 08-14-2003 05:39 AM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration