$ 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.
以下信息可能有助于解决问题:
以下软件包具有未满足的依赖关系:
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.
答案1
打开终端并输入:
sudo apt update
sudo apt upgrade
sudo apt --fix-broken install
sudo apt autoremove
然后运行:
sudo apt install octave
如果这不起作用,请使用资质它将自动检测包之间未满足的依赖关系问题并显示一些可能的解决方案:
sudo apt install aptitude
sudo aptitude install octave
一些注意事项的资质
如果两者都不起作用,也许您在 18.04 中持有 16.04 的破损包裹。请按照以下两个步骤操作:
/var/log/apt/term.log
在文本编辑器中打开日志文件。- 找到所有“损坏”的软件包并使用以下命令将其删除
sudo apt purge <package>
答案2
打开终端并输入: sudo aptitude install Octave 它将检测所有需要安装的依赖项,并提供解决问题的可能解决方案。输入“N”而不是“Y”继续,将给出另一个解决方案。在这种情况下,您输入“Y”,这些所需的依赖项将自动下载并安装。完成后,再次输入“sudo aptitude install Octave”以检查是否已正确安装所有必需的依赖项。如果是这样,输入“octave”,您将成功启动 GNU Octave!