-2

$ sudo apt-get install octave

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:

 gnupg : Breaks: software-properties-common (<= 0.96.24.3) but 0.96.20.7 is to be installed
 octave : Depends: liboctave4 (= 4.2.2-1ubuntu1) but it is not going to be installed
          Depends: libqscintilla2-qt5-13 (>= 2.8.4) but it is not going to be installed
          Depends: libqt5gui5 (>= 5.7.0) but it is not going to be installed
          Depends: libqt5opengl5 (>= 5.0.2) but it is not going to be installed
          Depends: libqt5printsupport5 (>= 5.0.2) but it is not going to be installed
          Depends: libqt5widgets5 (>= 5.6.0~beta) but it is not going to be installed
          Recommends: gnuplot-qt but it is not going to be installed or
                      gnuplot-x11 but it is not going to be installed or
                      gnuplot-nox
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
0

Open the terminal and type :

sudo apt update
sudo apt upgrade
sudo apt --fix-broken install 
sudo apt autoremove 

Then run :

sudo apt install octave  

If that doesn't work, use aptitude which will automatically detect unmet dependencies problems between packages and show some possible solutions:

sudo apt install aptitude
sudo aptitude install octave

some caveats of aptitude

If both of them don't work maybe you have held broken packages from 16.04 in 18.04. Follow these two steps :

  1. Open /var/log/apt/term.log log file in a text editor.
  2. Locate any "broken" packages and remove them with sudo apt purge <package>
0

Open the terminal and type: sudo aptitude install octave It will detect all the dependencies that need to be installed and provide a possible resolution to solve the problem. Enter "N" rather than "Y" to continue and another resolution will be given. In this case you enter "Y" and the those required dependencies will be downloaded and installed automatically. Once completed, type "sudo aptitude install octave" again to check if all required dependencies have been installed properly. If so, type "octave" and you'll successfully launch GNU Octave!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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