2

I am currently having an issue with Octave install in Archlinux. I am not able to load the current version of Octave 4.2.1 in Arch. It shows the following message -

/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

This problem with libgfortran.so.3 is not rare. Here are two similar problems happening in R 1 and 2. If somebody using Octave on Archlinux came across this issue, can you share how to resolve it. Thanks.

motiur
  • 1,640
  • 9
  • 33
  • 61
  • The accepted answer of the stackoverflow question that you linked to says, "If you install an older version of `gfortran` you will get `libgfortran.so.3`. It is completely fine to have multiple versions in your system." Did you try that? What worked and what didn't? – jadhachem Aug 13 '17 at 15:42
  • Have you installed GNU Octave from source or via package manager (pacman)? – Andy Aug 13 '17 at 16:05
  • I have installed it via pacman. – motiur Aug 13 '17 at 16:06
  • So when you saw whis https://stackoverflow.com/questions/44658867/r-v3-4-0-2-unable-to-find-libgfortran-so-3-on-arch why didn't it help you? Why should I not close this question as a duplicate of question 2? Please explain. – Vladimir F Героям слава Aug 13 '17 at 18:11
  • From question 1 *"So ... rebuild your locally installed quantreg R package, or install gcc5 and mark the thread as solved. The former is probably a much better approach."* So did you try rebuilding Octave or installing gcc 5? If not, why not? – Vladimir F Героям слава Aug 13 '17 at 18:13
  • Just give a second - I am giving you an answer. – motiur Aug 13 '17 at 18:16
  • I am installing gcc4.9 - my system at the moment contains gcc5. Also I have a feeling that my problem is coming from "octave-gui" package - so it is little different. – motiur Aug 13 '17 at 18:31
  • @VladimirF - the problem is yet to be solved . I installed gcc49. – motiur Aug 13 '17 at 19:41
  • And what happened? If your system contains gcc5, it should contain libgfortran.so.3 Which versions of libgfortran can you find in your /usr/lib64 /usr/local/lib64 /usr/lib /usr/local/lib and similar directories? Try to execute `locate libgfortran`. What is your `LD_LIBRARY_PATH`? – Vladimir F Героям слава Aug 13 '17 at 19:46
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/151840/discussion-between-motiur-and-vladimir-f). – motiur Aug 13 '17 at 20:28

2 Answers2

1

From the comments it became apparent that the solution from the referenced question R v3.4.0-2 unable to find libgfortran.so.3 on Arch needs to be appended, because the way the older GCC versions will be typically installed in Arch Linux is in a different path.

So, one must find, where the older version is installed, like

   /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgfortran.so.3

(depending on the exact GCC version)

and then add the version to LD_LIBRARY_PATH or make a symlik of the library from the above path to /usr/lib64/.

0

I got this issue because I installed earlier additionally openblas-lapack from AUR for better octave matrix multiplication performance. Updating openblas-lapack to newest version in AUR did the trick for me.

fala
  • 125
  • 4