Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
root@server:/home/ante# apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... 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.
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++ (>= 4:4.4.3) but it is not going to be installed
E: Broken packages

I tried installing libv8-dev from wheezy, running squeeze. The install went smooth, no extra dependencies required really. I created an /etc/apt/apt.conf file specifying that stable was my default source. I then ran an apt-get update followed by an apt-get upgrade. Then I decided to install lua and saw lua5.2 using apt-cache search. I installed, removed wheezy links from sources.list and uninstalled lua. The order might be incorrect because it seems my libc6 was updated and loads of packages uninstalled. Now I'm left with this message.

Is there a way of avoiding reinstalling everything? I seem to have gotten libc6 2.13-26 instead of 2.11.3-3.

share|improve this question

migrated from serverfault.com Mar 1 '12 at 13:26

This question came from our site for professional system and network administrators.

    
Trying to mix and match releases isn't something you should lightly. It sounds like you may have made a bit of a mess. Without knowing the exact details of what the loads of package that got installed I suspect the only think I can suggest is that you need to re0install. –  Zoredache Mar 1 '12 at 7:26
1  
Instead of forcing everything back to squeeze, you can analyse the situation with the text user interface (TUI) of aptitude where for example you can find broken packages using the b key and, if you have different packages sources in /etc/apt/sources.list*, you can up/downgrade manually the packages using the package information view (enter key). –  jofel Mar 1 '12 at 14:33
add comment

1 Answer 1

up vote 3 down vote accepted

You don't say whether or not you want to end up with Squeeze or Wheezy. I will assume you want the former, in which case you can downgrade to it by giving it a high pin priority:

$ cat /etc/apt/preferences
Package: *
Pin: release stable
Pin-Priority: 9000

That way, running apt-get upgrade && apt-get dist-upgrade is going to 'upgrade' all installed packages to their Squeeze versions.

share|improve this answer
    
Yes I want to remain in squeeze. Your answer worked fine. I created /etc/apt/preferences and readded wheeze to sources.list. Then a simple apt-get update && apt-get upgrade downgraded smoothly. I can now install packages without issues again. –  antennen Mar 1 '12 at 16:43
    
@antennen In the future, I recommend looking at debian backports if you need software newer than the stable tree provides. –  Shadur Mar 24 at 14:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.