I have a fresh install(1 week old) of Debian Stretch and been loading programs needed for my study. As part of it, I installed a program called GrADS. But, when I try to run it from the terminal, it shows the following error:

grads: symbol lookup error: /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined symbol: libssh2_scp_recv2

What does it mean and how can I correct it?

Output of apt policy:
Package files:

100 /var/lib/dpkg/status
     release a=now
 500 http://deb.debian.org/debian stretch/non-free amd64 Packages
     release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=non-free,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian stretch/contrib amd64 Packages
     release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=contrib,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian stretch/main amd64 Packages
     release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://deb.debian.org/debian stretch-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin deb.debian.org
 500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
Pinned packages:

Strangely, I can run the program from the (Whisker)Menu, it then opens in a new terminal windows, and works as expected as far as I tested.
Output of apt policy libssh2-1:

  Installed: 1.7.0-1
  Candidate: 1.7.0-1
  Version table:
 *** 1.7.0-1 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
        100 /var/lib/dpkg/status

Output of libcurl3-gnutls:


  Installed: 7.52.1-5+deb9u7
  Candidate: 7.52.1-5+deb9u7
  Version table:
 *** 7.52.1-5+deb9u7 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
        100 /var/lib/dpkg/status
     7.52.1-5+deb9u6 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
  • 3
    Your second update suggests that this isn’t an installation problem, but some side-effect of the environment you tried running grads from. (Also, your apt policy output is all good, and I know grads as provided in Debian 9 works fine.) Do you have anything in LD_LIBRARY_PATH? (echo $LD_LIBRARY_PATH) – Stephen Kitt Oct 24 '18 at 17:13
  • @StephenKitt Yep, /opt/wrf.cusat/parts/netcdf-fortran/lib:/opt/wrf.cusat/parts/netcdf/lib:/opt/wrf.cusat/parts/others – RogUE Oct 24 '18 at 17:16
  • @StephenKitt It has something to do with my .bashrc file. I have made some additions to the .bashrc file before. Now, I commented those additions and tried running grads again from the terminal, and it worked. – RogUE Oct 24 '18 at 17:21
  • OK, I’ve written up a short answer which attempts to address the issues in a general way. If you feel your question isn’t generally useful, feel free to delete it, I won’t mind ;-). – Stephen Kitt Oct 24 '18 at 17:28

The apt policy output shows that the libraries involved are up-to-date; Debian provides a set of coherent packages which are known to work with each other, so the error suggests there’s something in your environment causing the wrong library to be picked up.

As you discovered, this is related to configuration in your .bashrc. In general, to resolve this kind of issue, the approach is to look for libraries which aren’t being picked up correctly, typically by looking at ldd $(which grads), and then determining why that’s happening, e.g. by checking LD_LIBRARY_PATH.

  • I tried running ldd $(which grads), with and without the edit in bashrc file, but it is loading the same file from the same directory: libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f2c8d788000) [Output of the command ldd $(which grads) | grep gnutls]. – RogUE Nov 13 '18 at 14:40
  • The LD_LIBRARY_PATH which is causing the eroor is: export LD_LIBRARY_PATH=/opt/wrf.cusat/parts/netcdf-fortran/lib:/opt/wrf.cusat/parts/netcdf/lib:/opt/wrf.cusat/parts/others. Specifically, the last part of it, '/opt/wrf.cusat/parts/others'. – RogUE Nov 13 '18 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.