不断获取错误的库版本libchtslib。因此,需要版本9.0.0或更高版本,但是libcurl.4。dylib提供version 7.0.0

时间:2021-07-29 07:00:20

I am trying to install a program called metaBIT. I was able to add it to my PATH. But when I execute:

我正在尝试安装一个名为metaBIT的程序。我可以把它加到我的路径上。但是当我执行:

metaBIT -h 

It errors and gives me this:

它会出错,给我这个:

Traceback (most recent call last):
File "/Users/twpierson/edirect/metaBIT", line 12, in <module>
import pysam
File "//anaconda/lib/python2.7/site-packages/pysam/__init__.py", line 5, in       <module>
from pysam.libchtslib import *
ImportError: dlopen(//anaconda/lib/python2.7/site-  packages/pysam/libchtslib.so, 2): Library not loaded: libcurl.4.dylib
 Referenced from: //anaconda/lib/python2.7/site-packages/pysam/libchtslib.so
 Reason: Incompatible library version: libchtslib.so requires version 9.0.0    or later, but libcurl.4.dylib provides version 7.0.0

I have tried every available suggestion on this error using google search.

使用谷歌搜索,我已经尝试了所有关于这个错误的建议。

I attempted to uninstall and reinstall pysam.

我试图卸载和重新安装pysam。

pip uninstall pysamp 
pip install pysam

I still get the same error. Please help!

我还是会犯同样的错误。请帮助!

1 个解决方案

#1


2  

I would recommend installing the MacPorts or Homebrew version of cURL:

我建议安装MacPorts或Homebrew版本的cURL:

$ sudo port install curl

This will install the latest version of cURL (7.52.1 at this time) using MacPorts in /opt/local/bin/curl. MacPorts should do all the linking needed to use this latest version of cURL with macOS/OS X. After installing you can check the libcurl.4.dylib version by:

这将安装最新版本的cURL(此时为7.52.1),在/opt/local/bin/ cURL中使用MacPorts。MacPorts应该做所有的链接,使用这个最新版本的cURL和macOS/OS x。安装之后可以检查libcurl.4。dylib版本:

$ cd /opt/local/lib
$ otool -L libcurl.4.dylib
libcurl.4.dylib:
    /opt/local/lib/libcurl.4.dylib (compatibility version 9.0.0, current version 9.0.0)
    /opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

#1


2  

I would recommend installing the MacPorts or Homebrew version of cURL:

我建议安装MacPorts或Homebrew版本的cURL:

$ sudo port install curl

This will install the latest version of cURL (7.52.1 at this time) using MacPorts in /opt/local/bin/curl. MacPorts should do all the linking needed to use this latest version of cURL with macOS/OS X. After installing you can check the libcurl.4.dylib version by:

这将安装最新版本的cURL(此时为7.52.1),在/opt/local/bin/ cURL中使用MacPorts。MacPorts应该做所有的链接,使用这个最新版本的cURL和macOS/OS x。安装之后可以检查libcurl.4。dylib版本:

$ cd /opt/local/lib
$ otool -L libcurl.4.dylib
libcurl.4.dylib:
    /opt/local/lib/libcurl.4.dylib (compatibility version 9.0.0, current version 9.0.0)
    /opt/local/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)