Ubuntu – error while loading shared libraries: libpng12.so.0

aptpackage-managementsoftware installation

I am trying to install FreeSurfer: ftp://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz

I am following these steps to install FreeSurfer: https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall

When I run following commands:

freeview -v \
    bert/mri/T1.mgz \
    bert/mri/wm.mgz \
    bert/mri/brainmask.mgz \
    bert/mri/aseg.mgz:colormap=lut:opacity=0.2 \
    -f \
    bert/surf/lh.white:edgecolor=blue \
    bert/surf/lh.pial:edgecolor=red \
    bert/surf/rh.white:edgecolor=blue \
    bert/surf/rh.pial:edgecolor=red

I get this error:

freeview.bin: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

And when I am trying to install this package:

sudo apt-get install libpng12.so.0

I am getting this error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libpng12.0-0:i386
E: Couldn't find any package by glob 'libpng12.0-0'
E: Couldn't find any package by regex 'libpng12.0-0'

I am totally new to Linux, please help!

Best Answer

The software you are trying to run requires version 12 of libpng, which is no longer available in Ubuntu 16.10+. The best thing to do would be to install Ubuntu 16.04, or maybe let the developers of the software know about this problem so they can provide a version compatible with Ubuntu 16.10.

Related Question