Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to install flex and yacc on my Ubuntu machine.

sudo apt-get install byacc flex

I get this error:

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
     flex : Depends: m4
            Depends: libfl-dev (= 2.5.35-10ubuntu3) but it is not going to be installed
     virtualbox-4.2:i386 : Depends: libpython2.7:i386 (>= 2.7) but it is not going to be installed
                           Depends: libxml2:i386 (>= 2.7.4) but it is not going to be installed
                           Depends: psmisc:i386 but it is not going to be installed
                           Recommends: libsdl-ttf2.0-0:i386 but it is not going to be installed
                           Recommends: dkms:i386 but it is not installable
                           Recommends: linux-headers:i386
                           Recommends: gcc:i386 but it is not going to be installed
                           Recommends: make:i386 but it is not going to be installed
                           Recommends: binutils:i386 but it is not going to be installed
                           Recommends: pdf-viewer:i386
                           Recommends: python-central:i386 but it is not installable
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Why am I not able to install any software packages using apt-get command.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

It seems like a problem with broken dependencies in your system, perhaps due a previous interrupted installation (virtualbox-4.2:i386?). In the output you have a possible solution:

sudo apt-get -f install

It is the logical and safest first step, this will try to solve the problem. If the problem continues I'd try to remove the virtualbox-4.2 package.

sudo apt-get remove virtualbox-4.2
share|improve this answer
    
I did that way sudo apt-get -f install but it does crashed my Ubuntu. I just now recovered from it. –  user150563 Oct 15 '12 at 13:01
    
Have your mixed packages from non-official or from different ubuntu version repositories? –  andrade Oct 15 '12 at 13:15
    
Can't get what your saying.. –  user150563 Oct 15 '12 at 13:15
1  
I tried to install virtual box with dpkg it got stopped in the middle of the process. Thats what now creating the problem@ –  user150563 Oct 15 '12 at 13:40
1  
@user150563 Then sudo apt-get remove virtualbox-4.2 or sudo apt-get purge virtualbox-4.2 should fix it. –  andrade Oct 15 '12 at 13:43

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.