我无法在ubuntu上安装libgfortran3

时间:2015-07-08 07:28:09

标签: ubuntu

我尝试在ubuntu上安装libgfortran3:

sudo apt-get install libgfortran3

但是有一个我不明白的错误:

The following packages have unmet dependencies:
libgfortran3 : Depends: gcc-4.8-base (= 4.8.2-10ubuntu2) but    4.8.2-19ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

我该如何解决?

3 个答案:

答案 0 :(得分:0)

建议:

  1. 安装" best" GCC可用:sudo apt-get install gcc

    < =这应该安装" 4.8.2-19ubuntu1"

  2. 然后安装" libgfortran3"与" -force":sudo apt-get -f install libgfortran3

    < = libfortran是显而易见的"期待" gcc 4.8.2-10。这不应该是一个问题......

  3. 确保一切正常。
  4. 如果您有任何问题或疑问,请回复。

答案 1 :(得分:0)

如果已经安装了较新版本的gcc,则可接受的答案将不起作用。您仍然可以通过手动下载并安装lib来安装它:

apt download libgfortran3
sudo dpkg -i --force-depends libgfortran [your version] .deb

但是从现在开始,这将很容易抱怨无与伦比的依赖关系。可以通过手动更改libgfortran in的依赖项来临时解决此问题

/var/lib/dpkg/status

当我尝试在已经存在gcc-5.4.0的ubuntu氙气系统上安装r-base时,我发现了该解决方案,而libgfortran3恰好要求5.3.1-14ubuntu2。此解决方案的信用额为here

答案 2 :(得分:0)

???我已经在我的Ubuntu 19.10 Distro:Eoan

中修复了此问题。

第1步:从下面的链接下载gcc旧版本

https://ubuntu.pkgs.org/18.04/ubuntu-universe-amd64/gcc-6-base_6.4.0-17ubuntu1_amd64.deb.html

第2步:使用“ Ubuntu软件”安装.deb

第2步:在终端中运行以下命令, [快捷方式打开终端:(Ctrl + Alt + T)]

sudo apt-get install libgfortran3

相关问题