2

When I use in Matlab

!epstopdf "output.eps" --outfile=output.pdf

then I get one of the following message:

gs: /opt/MATLAB/R2016b/bin/glnxa64/libtiff.so.5: no version information available  (required by /usr/lib/libgs.so.9)
gs: /opt/sw/x86_64/generic/Matlab/R2016b/bin/glnxa64/libtiff.so.5: no version information available (required by /usr/lib64/libgs.so.9)
gs: /opt/sw/x86_64/generic/Matlab/R2017b/bin/glnxa64/libtiff.so.5: no version information available (required by /usr/lib64/libgs.so.9)

I am using Ghostscript 9.18 (default version of Ubuntu 16.04). (Same Problem with Ghostscript 9.07)

JoKalliauer
  • 1,575
  • 2
  • 17
  • 26

3 Answers3

2

no version information available means that you have an old version (of Ghostscript) see: https://stackoverflow.com/a/156387/6747994

Therefore you have to update to Ghostscript 9.23 (or newer): https://askubuntu.com/a/942995/676490

You have to

JoKalliauer
  • 1,575
  • 2
  • 17
  • 26
0

On my system (Linux Mint 21 Vanessa 64-bit), the problem lies in the incompatibility of the libraries libtiff.so.5 and libstdc++.so.6 installed with the system and those shipped with Matlab.

System:

  • /usr/lib/x86_64-linux-gnu/libstdc++.so.6 is a symlink to /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30
  • /usr/lib/x86_64-linux-gnu/libtiff.so.5 is a symlink to /usr/lib/x86_64-linux-gnu/libtiff.so.5.7.0

shipped with the Matlab distribution:

  • R2022b/sys/os/glnxa64/libstdc++.so.6 is a symlink to R2022b/sys/os/glnxa64/libstdc++.so.6.0.28
  • R2022b/bin/glnxa64/libtiff.so.5 is a symlink to R2022b/bin/glnxa64/libtiff.so.5.8.0

To overcome this problem, you need to ensure that the relevant symlinks in the Matlab's library folders point to the system library files rather than those shipped with Matlab. That is:

  • R2022b/sys/os/glnxa64/libstdc++.so.6 must be a symlink to /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30
  • R2022b/bin/glnxa64/libtiff.so.5 must be a symlink to /usr/lib/x86_64-linux-gnu/libtiff.so.5.7.0

This has been an issue for many years, and the above approach always worked. For a particular version of Matlab and your system, you simply need to use the Matlab folder and system libraries that are appropriate for your system (in the above example: R2022b and whatever versions are in the /usr/lib/x86_64-linux-gnu/ folder).

  • Thanks for your contribution, when does the error occur? – JoKalliauer Oct 11 '22 at 02:09
  • For me, it happens whenever I install a new version of Matlab. Matlab distribution comes with its own versions of libtiff.so and libstdc++.so, but these are typically different from those on the linux system. For some reason, they clash with each other, for example, when I want to make a call to epstopdf within Matlab (to convert eps files produced in Matlab to pdf files). – Lubos Polerecky Oct 14 '22 at 17:31
0

When I use the mex command to compile opencv c++ files or when I use mex files, i get an similar error message like this:

MATLAB/bin/glnxa64/libtiff.so.5: version `LIBTIFF_4.0' not found (required by *)

or

"Invalid MEX-file '.mexa64': libtiff.so.5: version 'LIBTIFF_4.0' not found"(required by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4)

I solved it in the following way, please refer to.

sudo rm -rf /usr/local/MATLAB/R2017a/bin/glnxa64/libtiff.so.5
sudo ln -s /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 /usr/local/MATLAB/R2017a/bin/glnxa64/libtiff.so.5

The first line of the command removes the libtiff.xo.5 file from its original path. The second command is to link /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4 to /usr/local/MATLAB/R2017a/bin/glnxa64/libtiff.so.5. This way the two file versions correspond and the problem is solved.

Execute the command locate libtiff.so.5.2.4 You will find this file in the /usr/local/MATLAB/R2017a/bin/glnxa64/ directory. /usr/lib/x86_64-linux-gnu/libtiff.so.5.2.4

Note that the matlab version path above should be the one belonging to you.