我无法在ubuntu上安装libgfortran3

问题描述 投票:1回答:2

我试图在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.

我该如何解决?

ubuntu
2个回答
0
投票

建议:

  1. 安装“最佳”GCC:sudo apt-get install gcc。 <=这应该安装“4.8.2-19ubuntu1”
  2. 然后用“-force”:sudo apt-get -f install libgfortran3安装“libgfortran3”。 <= libfortran显然“期待”gcc 4.8.2-10。这应该不是问题......
  3. 确保一切正常。

如果您有任何问题或疑问,请回复。


0
投票

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

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

但是这将使得从现在开始抱怨无法比拟的依赖。这可以通过手动更改libgfortran的依赖项来临时修复

/var/lib/dpkg/status

当我尝试在已经存在gcc-5.4.0的ubuntu xenial系统上安装r-base时,我找到了这个解决方案,而libgfortran3正好要求5.3.1-14ubuntu2。这个解决方案的积分去here

© www.soinside.com 2019 - 2024. All rights reserved.