5

I have seen a few other questions like this elsewhere but I can't seem to find a resolution that works for me. I am trying to run samtools using python on anaconda. I am running macosx catalina. Here is the error code

dyld: Library not loaded: @rpath/libcrypto.1.0.0.dylib
  Referenced from: /Users/me/anaconda3/bin/samtools
  Reason: image not found
zsh: abort      samtools

I have tried all sorts of efforts to install an earlier version of openssl through anaconda but it still shows that I have openssl version 1.1.1 installed.

Thanks for any guidance on how to either (a) install an earlier version of openssl through anaconda or (b) direct samtools to evaluate a different path for an earlier version or (c) any other solution.

user2416002
  • 99
  • 1
  • 7
  • Have you found any workarounds using `conda` without the need to compile `samtools` from source? Such as downgrading the dependency in the same command line as installing `samtools` with `conda`? I have a similar issue, but I am confined to `conda` based solutions because the overall application (Galaxy) requires it. – Timur Shtatland Feb 02 '22 at 18:12

1 Answers1

3

Ok, so I am open to other solutions but this is what worked for me if anyone else runs into this issue.

I downloaded the package from sourceforge (https://sourceforge.net/projects/samtools/) and compiled it as the readme file states. Instead of running samtools from the anaconda package that is in my path I moved this newly compiled file to the folder of interest. I call it from there as follows:

cd users/me/desktop/example  (where samtools executable lives in this folder)

./samtools etc etc

I know this is basic for many but not for me and I hope it is helpful to anyone else who has this issue in the future

user2416002
  • 99
  • 1
  • 7
  • 1
    if you add that path_to_samtools_executable to PATH you will be able to call samtools as is without the path. By the way, you can find samtools software here http://www.htslib.org/download/ – aerijman Jan 03 '21 at 02:12
  • I agree with @aerijman that adding it to the path will make it simpler to call if you use it frequently, but just wanted to add that you will also need to remove it from your conda environment, because otherwise the conda version will still be used. So: `conda remove samtools` and add into the .bash_profile a line with `export PATH=FolderWhereYouInstalledIt/samtools-1.11/bin:$PATH` – rrr May 19 '21 at 19:38