ImportError: libgsl.so.0

860 views
Skip to first unread message

Andrew Hardy

unread,
Jul 27, 2016, 4:39:51 AM7/27/16
to RSGISLib Support
Hi guys, my installation of RSGISLib on LinuxMint was having a few issues ("image not found" error) so I tried a complete reinstall using Miniconda 3 python 3.5 and the commands:

conda install -c osgeo arcsi \
               tuiview spdlib \
               ipython

echo "export GDAL_DRIVER_PATH=~/miniconda3/lib/gdalplugins" >> ~/.bashrc
echo "export GDAL_DATA=~/miniconda3/share/gdal" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install gfortran



However, when i try to import a library in python (e.g. from rsgislib.rastergis import ratutils) i receive the following error message:
ImportError: libgsl.so.0: cannot open shared object file: No such file or directory

I have seen similar references to this error within RSGISLib support but the suggested solutions do not help. Any advice? (PS I also tried a complete reinstall of Miniconda).

Many thanks,
Andy

Pete Bunting [pfb]

unread,
Jul 27, 2016, 4:41:17 AM7/27/16
to Andrew Hardy, RSGISLib Support
Hi Andy, 

If you run conda list what packages and package versions do you have installed. 

Cheers, Pete

****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK

* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.



--------------------------------------------------------------------
Astudio gyda ni yn Aberystwyth - Prifysgol Gyntaf Cymru https://www.aber.ac.uk/cy/undergrad/

Study at Aberystwyth – Wales’ First University https://www.aber.ac.uk/en/undergrad/

Daniel Clewley

unread,
Jul 27, 2016, 4:52:01 AM7/27/16
to Pete Bunting, Andrew Hardy, RSGISLib Support
Hi Andy,

Try without SPDLib (if you need it best in a separate environment) as the latest version is built against conda-forge GDAL 2.0 packages and this could be causing problems.

Thanks,

Dan

Andy Hardy

unread,
Jul 27, 2016, 5:35:44 AM7/27/16
to Daniel Clewley, Pete Bunting, RSGISLib Support
Thanks Dan,
I removed the installation (conda remove rsgislib tuiview spdlib) and reinstalled just rsgislib and tuiview but the same error pops up. Should I force the installation to an older version to get around potential GDAL 2.0 issues?

Cheers,
Andy

conda install-c osgeo arcsi \

Daniel Clewley

unread,
Jul 29, 2016, 3:11:05 AM7/29/16
to Andy Hardy, Pete Bunting, RSGISLib Support
Hi Andy,

Removing the packages won’t remove all the dependencies as well. The best think to do is use a different environment as this starts from scratch.

Before this I would remove cached packages using:

conda remove --tar --packages --yes 

Then create a new environment using:

 conda create -n rsgislib_env -c osgeo arcsi tuiview ipython

Then activate.

Thanks,

Dan

Daniel Clewley

unread,
Jul 29, 2016, 4:58:15 AM7/29/16
to Andy Hardy, RSGISLib Support
Hi Andy,

What version of GSL do you have installed? It should be 1.16, you can check with:

conda list | grep ‘gsl'

If it isn’t this version try:

conda install -c osgeo gsl=1.16

I have a feeling we haven’t pinned the version on the RSGISLib build so it will use a newer one if it finds one - which would cause the error you are seeing.

We do have a plan to improve the conda builds by using packages from the conda-forge channel where possible but haven’t finalised this yet.

Thanks,

Dan

On 29 Jul 2016, at 09:16, Andy Hardy <ajha...@gmail.com> wrote:

Thanks for the reply Dan – I tried a reinstall within a new conda environment but this still didn’t work, receiving the same ImportError.

Thanks again,

Andrew Hardy

unread,
Jul 29, 2016, 5:20:17 AM7/29/16
to Daniel Clewley, RSGISLib Support
Hi Dan,
The version is 2.1. I have downgraded to version 1.16 as you suggested and it seems to be working fine now!

Thanks once again for you help :)

Andy

Anders Knudby

unread,
Aug 24, 2016, 1:52:09 PM8/24/16
to RSGISLib Support, daniel....@gmail.com
Hi Dan,

I have the same problem (see attached, import error, cannot open shared object, no such file or directory), except my problem is with libnetcdf.so.7. (and I previously had a problem with libgdal.so.0, but that has mysteriously solved itself)

I followed the instructions here: https://spectraldifferences.wordpress.com/2014/05/27/arcsi/#comments, except Miniconda now uses Python 3.5 instead of 3.4.

The current installation is using libnetcdf 4.4.0, and libgdal 2.0.0.

Anders
To post to this group, send email to rsgisli...@googlegroups.com.


--------------------------------------------------------------------
Astudio gyda ni yn Aberystwyth - Prifysgol Gyntaf Cymru https://www.aber.ac.uk/cy/undergrad/

Study at Aberystwyth – Wales’ First University https://www.aber.ac.uk/en/undergrad/
Capture.PNG

Daniel Clewley

unread,
Aug 24, 2016, 3:52:22 PM8/24/16
to Anders Knudby, RSGISLib Support
Hi Anders,

libgdal 2.0.0 is the version of GDAL from the default channel. We’ve never built RSGISLib against this so this is probably causing problems. Under Linux we’ve recently rebuilt RSGISLib the packages using conda-forge. Try:

conda create -n rsgislib_env \
             -c conda-forge \
             -c osgeo\
             arcsi tuiview

# Activate environment
source activate rsgislib_env

If this doesn’t work try just removing your conda install and re-installing from scratch.

Thanks,

Dan

Anders Knudby

unread,
Aug 25, 2016, 9:48:20 AM8/25/16
to Daniel Clewley, RSGISLib Support
Yep, that worked, and was remarkably simple! Thanks for your help, and just generally for providing and maintaining ARCSI, not sure what I'd do without it.
Anders
--
Anders Knudby, PhD
e-mail: knu...@gmail.com
skype ID: anders.knudby

Man's mind, once stretched by a new idea, never regains its original dimensions.
~ Oliver Wendell Holmes
Reply all
Reply to author
Forward
0 new messages