Questions sur l'installation et la configuration de Manjaro Linux.
Répondre

Numpy, R, octave probleme avec libgfortran- virer gcc7 ?

#1Messageil y a 6 ans

Bonjour,
Importer numpy echoue!! :evil:

$ python
Python 3.6.1 (default, Mar 27 2017, 00:27:06)
[GCC 6.3.1 20170306] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nummpy as np
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'nummpy'
>>> import numpy as np
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/numpy/core/__init__.py", line 16, in <module>
    from . import multiarray
ImportError: libgfortran.so.3: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/usr/lib/python3.6/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python3.6/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/lib/python3.6/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/lib/python3.6/site-packages/numpy/core/__init__.py", line 26, in <module>
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: libgfortran.so.3: cannot open shared object file: No such file or directory



R et Octave ne démarrent plus:

$ R
/usr/lib64/R/bin/exec/R: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory


$ octave
/usr/lib/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory


Le fautif est libgfortran.so.3.

Quelques recherches montrent quele sujet est récent https://www.google.fr/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwj_uv2Ik_zUAhWFuRQKHXJIDHYQFggjMAA&url=https%3A%2F%2Fbbs.archlinux.org%2Fviewtopic.php%3Fid%3D226849&usg=AFQjCNFT9WBNAiYL4yatWLfN-UfoKeO2qQ

Chez moi cela donne:
$ pacman -Fs libgfortran.so.3

extra/gcc49 4.9.3-2
    usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/libgfortran.so.3
community/gcc5 5.4.0-1
    usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgfortran.so.3


J'ai aussi la version supérieure:

$ pacman -Fs libgfortran.so.4
core/gcc-libs 7.1.1-3
    usr/lib/libgfortran.so.4
multilib/gcc-libs-multilib 7.1.1-3
    usr/lib/libgfortran.so.4
multilib/lib32-gcc-libs 7.1.1-3
    usr/lib32/libgfortran.so.4


la bonne version de gcc est bien installée:

$ pacman -Ss gcc
core/gcc 7.1.1-3 (base-devel)
    The GNU Compiler Collection - C and C++ frontends
core/gcc-ada 7.1.1-3
    Ada front-end for GCC (GNAT)
core/gcc-fortran 7.1.1-3 [installé]
    Fortran front-end for GCC
core/gcc-go 7.1.1-3
    Go front-end for GCC
core/gcc-libs 7.1.1-3 (base)
    Runtime libraries shipped by GCC
core/gcc-objc 7.1.1-3
    Objective-C front-end for GCC
extra/gcc49 4.9.3-2 [installé]
    The GNU Compiler Collection
extra/libgsystem 2015.2+4+gd606bec-1
    "Copylib" for system service modules using GLib with GCC
community/aarch64-linux-gnu-gcc 7.1.0-1
    The GNU Compiler Collection - cross compiler for ARM64 target
community/arduino-avr-core 1.6.19-1
    Arduino AVR core with upstream avr-gcc and avrdude
community/arm-none-eabi-gcc 7.1.0-1
    The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target
community/avr-gcc 7.1.0-1
    The GNU AVR Compiler Collection
community/colorgcc 1.4.4-2
    A Perl wrapper to colorize the output of compilers with warning/error messages matching the gcc output format
community/gcc-docs 6.3.0-1
    Set of HTML documentation for GCC
community/gcc5 5.4.0-1 [installé]
    The GNU Compiler Collection (5.x.x)
community/gdc 6.2.1-2
    Compiler for D programming language which uses gcc backend
community/mingw-w64-gcc 7.1.1-1 (mingw-w64-toolchain mingw-w64)
    Cross GCC for the MinGW-w64 cross-compiler
multilib/gcc-ada-multilib 7.1.1-3
    Ada front-end for GCC (GNAT) for multilib
multilib/gcc-fortran-multilib 7.1.1-3
    Fortran front-end for GCC for multilib
multilib/gcc-go-multilib 7.1.1-3
    Go front-end for GCC for multilib
multilib/gcc-libs-multilib 7.1.1-3 [installé]
    Runtime libraries shipped by GCC for multilib
multilib/gcc-multilib 7.1.1-3 (multilib-devel) [installé]
    The GNU Compiler Collection - C and C++ frontends for multilib
multilib/gcc-objc-multilib 7.1.1-3
    Objective-C front-end for GCC for multilib
multilib/lib32-gcc-libs 7.1.1-3 [installé]
    Runtime libraries shipped by GCC (32-bit)


Il semble que la version de gcc soit trop en avance. Peut-on desinstaller gcc 7 sans risque?

Numpy, R, octave probleme avec libgfortran- virer gcc7 ?

#2Messageil y a 6 ans

Oui, je viens de le faire , ça se vire sans problème. Je l'ai réinstallé depuis le cache.
Si tu n'as pas fait sudo pacman -Sc tu pourras installer une version antérieur avec

sudo  pacman -U /var/cache/pacman/pkg/gcc(version que tu as en réserve).tar.gz

Numpy, R, octave probleme avec libgfortran- virer gcc7 ?

#3Messageil y a 6 ans

y a-t-il un moyen de voir l'effet d'une commande pacman san l'effectuer? La suppression de gcc-multilib entraine la suppression de très nombreux paquets haskell ... j'ai un peur peur d'effets en cascade.

Numpy, R, octave probleme avec libgfortran- virer gcc7 ?

#4Messageil y a 6 ans

Oui, on lance la commande en sudo , mais on ne confirme pas. Un pacman -Qi donnera toutes les infos du paquet y compris les paquets qui le requièrent. Pour ma part, je n'en vois aucun....

[steph@steph-lenovo ~]$ pacman -Qi gcc
Nom                      : gcc
Version                  : 7.1.1-3
Description              : The GNU Compiler Collection - C and C++ frontends
Architecture             : x86_64
URL                      : http://gcc.gnu.org
Licences                 : GPL  LGPL  FDL  custom
Groupes                  : base-devel
Fournit                  : --
Dépend de                : gcc-libs=7.1.1-3  binutils>=2.28  libmpc
Dépendances opt.         : --
Requis par               : --
Optionnel pour           : xorg-xrdb
Est en conflit avec      : --
Remplace                 : --
Taille installée         : 115,60 MiB
Paqueteur                : Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
Compilé le               : mer. 21 juin 2017 08:56:24 CEST
Installé le              : dim. 09 juil. 2017 19:08:10 CEST
Motif d’installation     : Explicitement installé
Script d’installation    : Non
Validé par               : --

Numpy, R, octave probleme avec libgfortran- virer gcc7 ?

#5Messageil y a 6 ans

Chez moi, il n'ypas de paquet gcc à proprement parlé:

$ pacman -Qi gcc
erreur : le paquet « gcc » n’a pas été trouvé


il y a gcc-multilib

$ pacman -Qi gcc-multilib
Nom                      : gcc-multilib
Version                  : 7.1.1-3
Description              : The GNU Compiler Collection - C and C++ frontends for multilib
Architecture             : x86_64
URL                      : http://gcc.gnu.org
Licences                 : GPL  LGPL  FDL  custom
Groupes                  : multilib-devel
Fournit                  : gcc=7.1.1-3
Dépend de                : gcc-libs-multilib=7.1.1-3  binutils>=2.28  libmpc
Dépendances opt.         : --
Requis par               : gcc-fortran  ghc
Optionnel pour           : xorg-xrdb
Est en conflit avec      : gcc
Remplace                 : --
Taille installée         : 123,09 MiB
Paqueteur                : Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Compilé le               : dim. 28 mai 2017 19:22:21 CEST
Installé le              : dim. 09 juil. 2017 13:41:32 CEST
Motif d’installation     : Installé comme dépendance d’un autre paquet
Script d’installation    : Non
Validé par               : Signature


ghc est impacté:

$ pacman -Qi ghc
Nom                      : ghc
Version                  : 8.0.2-1
Description              : The Glasgow Haskell Compiler
Architecture             : x86_64
URL                      : http://www.haskell.org/ghc/
Licences                 : custom
Groupes                  : --
Fournit                  : haskell-array=0.5.1.1  haskell-base=4.9.1.0  haskell-binary=0.8.3.0  haskell-bytestring=0.10.8.1  haskell-containers=0.5.7.1  haskell-deepseq=1.4.2.0  haskell-directory=1.3.0.0
                           haskell-filepath=1.4.1.1  haskell-ghc-boot=8.0.2  haskell-ghc-boot-th=8.0.2  haskell-ghc-prim=0.5.0.0  haskell-haskeline=0.7.3.0  haskell-hoopl=3.10.2.1  haskell-hpc=0.6.0.3
                           haskell-integer-gmp=1.0.0.1  haskell-pretty=1.1.3.3  haskell-process=1.4.3.0  haskell-template-haskell=2.11.1.0  haskell-terminfo=0.4.0.2  haskell-time=1.6.0.1
                           haskell-transformers=0.5.2.0  haskell-unix=2.7.2.1  haskell-xhtml=3000.2.1  haskell-cabal=1.24.2.0  haskell-ghc=8.0.2
Dépend de                : gcc  gmp  libffi  perl
Dépendances opt.         : --
Requis par               : haskell-aeson  haskell-aeson-pretty  haskell-asn1-encoding  haskell-asn1-parse  haskell-asn1-types  haskell-async  haskell-attoparsec  haskell-base-compat  haskell-base64-bytestring
                           haskell-blaze-builder  haskell-blaze-html  haskell-blaze-markup  haskell-byteable  haskell-case-insensitive  haskell-cereal  haskell-cmark  haskell-cmdargs  haskell-conduit
                           haskell-conduit-extra  haskell-connection  haskell-cookie  haskell-cryptonite  haskell-data-default  haskell-data-default-class  haskell-data-default-instances-containers
                           haskell-data-default-instances-dlist  haskell-data-default-instances-old-locale  haskell-digest  haskell-dlist  haskell-doctemplates  haskell-exceptions  haskell-extensible-exceptions
                           haskell-filemanip  haskell-foundation  haskell-haddock-library  haskell-hashable  haskell-hourglass  haskell-hs-bibutils  haskell-hslua  haskell-http  haskell-http-client
                           haskell-http-client-tls  haskell-http-types  haskell-hxt  haskell-hxt-charproperties  haskell-hxt-regex-xmlschema  haskell-hxt-unicode  haskell-integer-logarithms  haskell-juicypixels
                           haskell-lexer  haskell-lifted-base  haskell-memory  haskell-mime-types  haskell-mmorph  haskell-monad-control  haskell-mtl  haskell-network  haskell-network-uri  haskell-old-locale
                           haskell-old-time  haskell-pandoc-types  haskell-parsec  haskell-pem  haskell-pretty-show  haskell-primitive  haskell-quickcheck  haskell-random  haskell-regex-base  haskell-regex-pcre
                           haskell-resourcet  haskell-rfc5051  haskell-safe  haskell-scientific  haskell-semigroups  haskell-setenv  haskell-sha  haskell-skylighting  haskell-socks  haskell-split  haskell-stm
                           haskell-streaming-commons  haskell-syb  haskell-tagged  haskell-tagsoup  haskell-temporary  haskell-texmath  haskell-text  haskell-text-icu  haskell-tf-random
                           haskell-time-locale-compat  haskell-tls  haskell-transformers-base  haskell-transformers-compat  haskell-unix-compat  haskell-unordered-containers  haskell-utf8-string
                           haskell-uuid-types  haskell-vector  haskell-x509  haskell-x509-store  haskell-x509-system  haskell-x509-validation  haskell-xml  haskell-xml-conduit  haskell-xml-types  haskell-yaml
                           haskell-zip-archive  haskell-zlib  pandoc  pandoc-citeproc
Optionnel pour           : --
Est en conflit avec      : --
Remplace                 : haskell-array  haskell-base  haskell-binary  haskell-bytestring  haskell-containers  haskell-deepseq  haskell-directory  haskell-filepath  haskell-ghc-boot  haskell-ghc-boot-th
                           haskell-ghc-prim  haskell-haskeline  haskell-hoopl  haskell-hpc  haskell-integer-gmp  haskell-pretty  haskell-process  haskell-template-haskell  haskell-terminfo  haskell-time
                           haskell-transformers  haskell-unix  haskell-xhtml  haskell-cabal  haskell-ghc
Taille installée         : 410,62 MiB
Paqueteur                : Felix Yan <felixonmars@archlinux.org>
Compilé le               : mer. 14 juin 2017 20:52:47 CEST
Installé le              : lun. 26 juin 2017 18:18:28 CEST
Motif d’installation     : Installé comme dépendance d’un autre paquet
Script d’installation    : Oui
Validé par               : Signature

Numpy, R, octave probleme avec libgfortran- virer gcc7 ?

#6Messageil y a 6 ans

Répondre