无法安装 libgfortran3(未满足的依赖项)

无法安装 libgfortran3(未满足的依赖项)

我无法安装 ligbfortran3。解决这个问题的最佳方法是什么?我想尽可能保持我的安装标准。谢谢。

root@arau:~# apt-get --simulate install libgfortran3
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:
 libgfortran3 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
E: Unable to correct problems, you have held broken packages.
root@arau:~# 
root@arau:~# 
root@arau:~# 
root@arau:~# 
root@arau:~# aptitude show gcc-4.8-base 
Package: gcc-4.8-base                    
State: installed
Automatically installed: no
Multi-Arch: same
Version: 4.8.4-2ubuntu1~14.04
Priority: required
Section: libs
Maintainer: Ubuntu Core developers <[email protected]>
Architecture: amd64
Uncompressed Size: 222 k
Breaks: dehydra (<= 0.9.hg20110609-2), dehydra (<= 0.9.hg20110609-2), gcc-4.4-base (< 4.4.7), gcc-4.4-base (< 4.4.7), gcc-4.7-base (< 4.7.3),
        gcc-4.7-base (< 4.7.3), gcj-4.4-base (< 4.4.6-9~), gcj-4.4-base (< 4.4.6-9~), gcj-4.6-base (< 4.6.1-4~), gcj-4.6-base (< 4.6.1-4~),
        gnat-4.4-base (< 4.4.6-3~), gnat-4.4-base (< 4.4.6-3~), gnat-4.6 (< 4.6.1-5~), gnat-4.6 (< 4.6.1-5~), gcc-4.8-base (!= 4.8.4-2ubuntu1~14.04)
Replaces: gcc-4.8-base (< 4.8.4-2ubuntu1~14.04)
Description: GCC, the GNU Compiler Collection (base package)
 This package contains files common to all languages and libraries contained in the GNU Compiler Collection (GCC).
Homepage: http://gcc.gnu.org/

我的 sources.list 是标准的:

root@arau:~# cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://fr.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://fr.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://fr.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu/ trusty multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.


## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

------------- 编辑 1

root@arau:~# apt-cache policy gcc-4.8-base
gcc-4.8-base:
  Installed: 4.8.4-2ubuntu1~14.04
  Candidate: 4.8.4-2ubuntu1~14.04
  Version table:
 *** 4.8.4-2ubuntu1~14.04 0
        100 /var/lib/dpkg/status
     4.8.2-19ubuntu1 0
        500 http://fr.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

------------- 编辑 2

root@arau:~# dpkg -l | grep gcc
ii  gcc                                                   4:4.8.2-1ubuntu6                                    amd64        GNU C compiler
ii  gcc-4.8                                               4.8.4-2ubuntu1~14.04                                amd64        GNU C compiler
ii  gcc-4.8-base:amd64                                    4.8.4-2ubuntu1~14.04                                amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-4.9-base:amd64                                    4.9.1-0ubuntu1                                      amd64        GCC, the GNU Compiler Collection (base package)
ii  libgcc-4.8-dev:amd64                                  4.8.4-2ubuntu1~14.04                                amd64        GCC support library (development files)
ii  libgcc1:amd64                                         1:4.9.1-0ubuntu1                                    amd64        GCC support library

------------- 编辑 3

实际上“aptitude”解决了我的问题,谢谢大家。

root@arau:~# aptitude install libgfortran3
The following NEW packages will be installed:
  libgfortran3{b} 
0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 250 kB of archives. After unpacking 1 230 kB will be used.
The following packages have unmet dependencies:
 libgfortran3 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is installed.
Internal error: found 2 (choice -> promotion) mappings for a single choice.
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libgfortran3 [Not Installed]                       



Accept this solution? [Y/n/q/?] n
Internal error: found 2 (choice -> promotion) mappings for a single choice.
Internal error: found 2 (choice -> promotion) mappings for a single choice.
The following actions will resolve these dependencies:

      Downgrade the following packages:                                        
1)      cpp-4.8 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]       
2)      gcc-4.8 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]       
3)      gcc-4.8-base [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]  
4)      libasan0 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]      
5)      libatomic1 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]    
6)      libgcc-4.8-dev [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]
7)      libgomp1 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]      
8)      libitm1 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]       
9)      libquadmath0 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]  
10)     libstdc++6 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]    
11)     libtsan0 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)]      



Accept this solution? [Y/n/q/?] y

答案1

您真的需要版本 3 吗?我信任的系统上当前使用的是 4.8 版本。如果您有一个引用如此旧版本的旧可执行文件,请尝试添加指向 4 版本的链接。这可能有效,除非旧 exe 使用的是过时的功能。

假设您确实需要 3 个库,也许一种方法是安装 32 位版本以避免与 64 位版本的库发生冲突。

尝试查看仍受支持的 12.04.5 版本,看看它使用的是哪个版本,但假设它也是 4。目前不支持以 3 fortran 为标准的版本。

您可以删除冲突的软件包(可能有几个),尝试安装 lib3,查看有什么新的投诉,删除它们,直到最终没有冲突。然后您需要提供所需版本的源,这里变得混乱,然后如果您可以成功使事情保持一致,请冻结它,这样这些软件包就不会再发生更新。这肯定不是您想要的标准安装。

我认为最好的方法是将 lib3 视为交叉编译器。在本地安装所需的内容,不要触碰常规系统。

相关内容