【问题标题】:Installing saltstack at OS X - Error: ld: library not found for -lssl在 OS X 上安装 saltstack - 错误:ld: library not found for -lssl
【发布时间】:2013-11-08 07:01:21
【问题描述】:

我正在尝试使用 Xcode v 5.0 在 OS X 10.8 上安装 saltstack 并安装 dev。工具,关注这个tutorial

使用pip install salt 安装时出现以下错误:

clang -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/include -I/Users/TK/.virtualenvs/cattapp/build/M2Crypto/SWIG -c SWIG/_m2crypto_wrap.c -o build/temp.macosx-10.6-intel-2.7/SWIG/_m2crypto_wrap.o -DTHREADING

clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -isysroot /Developer/SDKs/MacOSX10.6.sdk -g build/temp.macosx-10.6-intel-2.7/SWIG/_m2crypto_wrap.o -L/usr/lib -lssl -lcrypto -o build/lib.macosx-10.6-intel-2.7/M2Crypto/__m2crypto.so

ld: library not found for -lssl

clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: command 'clang' failed with exit status 1

----------------------------------------
Command /Users/TK/.virtualenvs/cattapp/bin/python -c "import setuptools;__file__='/Users/TK/.virtualenvs/venv/build/M2Crypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-kUuPr8-record/install-record.txt --install-headers /Users/TK/.virtualenvs/venv/bin/../include/site/python2.7 failed with error code 1 in /Users/TK/.virtualenvs/venv/build/M2Crypto
Exception information:
Traceback (most recent call last):
  File "/Users/TK/.virtualenvs/venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/Users/TK/.virtualenvs/venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 250, in run
    requirement_set.install(install_options, global_options)
  File "/Users/TK/.virtualenvs/venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install
    requirement.install(install_options, global_options)
  File "/Users/TK/.virtualenvs/venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 577, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/Users/TK/.virtualenvs/venv/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /Users/TK/.virtualenvs/cattapp/bin/python -c "import setuptools;__file__='/Users/TK/.virtualenvs/venv/build/M2Crypto/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-kUuPr8-record/install-record.txt --install-headers /Users/TK/.virtualenvs/venv/bin/../include/site/python2.7 failed with error code 1 in /Users/TK/.virtualenvs/venv/build/M2Crypto

显然找不到lssl 库。知道如何安装它或出了什么问题?

【问题讨论】:

  • 你在学习什么教程?我认为您忘记将“本教程”设为链接。
  • 更新了缺失的链接..

标签: macos salt-stack


【解决方案1】:

找不到的是ssl库。

安装 libssl 然后再试一次。

【讨论】:

  • 如何安装它?搜索 mac os install libssl 会弹出我的 mac 上已经安装的 openssl。
  • 安装在哪里?因为 clang 被赋予了选项-L/usr/lib,这意味着它正在/usr/lib 中寻找它。我敢打赌它实际上是在/usr/local/lib/opt/local/lib
  • 它实际上在 cd /usr/local/ssl/bin/ 中,在我安装了它的最新版本之后:techscienceinterest.blogspot.co.at/2010/12/…。我现在使用以下命令在/usr/lib 创建了一个指向openssh 的符号链接:ln -s /usr/local/ssl/bin/openssl openssl。不幸的是仍然遇到同样的错误。
  • 您没有在问题顶部包含指向您正在使用的教程的链接。您创建的链接不起作用,您需要链接到包含libssl.alibssl.dylib 的目录。更好的是,更改 -L 参数以搜索 ssl 库的正确位置。
  • 任何人在尝试在 macOS Sierara 上安装 psycopg2 时遇到此问题,我的回答可能会有所帮助:stackoverflow.com/a/39244687/1444152
猜你喜欢
  • 2015-11-03
  • 2021-09-21
  • 2016-07-02
  • 1970-01-01
  • 2020-12-10
  • 2015-06-15
  • 2021-03-27
  • 1970-01-01
  • 2016-05-21
相关资源
最近更新 更多