Ubuntu – GNU-Octave won’t install because of package conflicts

gnuoctavepackage-managementsoftware installation

I am trying to install GNU-Octave in Ubuntu 14.04 LTS form the Ubuntu Software Center. I am getting the following error:

Package dependencies cannot be resolved

This error could be caused by required additional software packages
which are missing or not installable. Furthermore there could be a
conflict between software packages which are not allowed to be
installed at the same time.

The following packages have unmet dependencies:

octave: Depends: libgcc1 (>= 1:4.1.1) but 1:4.9.1-0ubuntu1 is to be
installed
        Depends: libglpk36 (>= 4.51) but 4.52.1-2build1 is to be installed
        Depends: liboctave3 (= 4.0.0-3ubuntu2~octave~trusty1) but 4.0.0-3ubuntu2~octave~trusty1 is to be installed
        Depends: libgl1-mesa-glide3 but it is not going to be installed
        Depends: libportaudio2 (>= 19+svn20101113) but 19+svn20140130-1 is to be installed
        Depends: libqt4-network (>= 4:4.5.3) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
        Depends: libqt4-opengl (>= 4:4.5.3) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
        Depends: libqtcore4 (>= 4:4.7.0~beta1) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
        Depends: libqtgui4 (>= 4:4.8.0) but 4:4.8.5+git192-g085f851+dfsg-2ubuntu4.1 is to be installed
        Depends: libstdc++6 (>= 4.6) but 4.8.4-2ubuntu1~14.04 is to be installed
        Depends: octave-common (= 4.0.0-3ubuntu2~octave~trusty1) but 4.0.0-3ubuntu2~octave~trusty1 is to be installed

Is this a common issue? I am not sure which packages are causing the conflict, or if there is a way to successfully install Octave.

Best Answer

You must install dependencies before installing octave. A dependency is a file that something you are trying to install requires for it's operation.

So, to install all the dependencies OCTAVE requires, follow these steps

  1. Open terminal.
  2. Type sudo apt-get build-dep octave.
  3. Enter password and follow instructions.

This will install all the dependencies that octave requires. Source - here.

After this Go to software center and install octave. Hope it helps!

Related Question