0

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.

1 Answer 1

2

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
8
  • I did that way sudo apt-get -f install but it does crashed my Ubuntu. I just now recovered from it.
    – user150563
    Commented Oct 15, 2012 at 13:01
  • Have your mixed packages from non-official or from different ubuntu version repositories?
    – andrade
    Commented Oct 15, 2012 at 13:15
  • Can't get what your saying..
    – user150563
    Commented Oct 15, 2012 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
    Commented Oct 15, 2012 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
    Commented Oct 15, 2012 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .