【问题标题】:OSX Lion installation of ruby 1.8.7 (xcode command-line-tools): OpenSSL development headers... not foundruby 1.8.7(xcode 命令行工具)的 OSX Lion 安装:OpenSSL 开发标头...未找到
【发布时间】:2012-03-21 07:41:45
【问题描述】:

我不知道确切的时间,但假设从 Snow Leopard 升级到 Lion (10.7.3) 我的系统配置似乎搞砸了。尝试安装 ree-1.8.7 时,无论尝试哪种方式,我都遇到了同样的问题:

Checking for required software...

* Non-broken C compiler... found at /usr/bin/gcc-4.2
* Non-broken C++ compiler... found at /usr/bin/g++-4.2
* The 'make' tool... found at /usr/bin/make
* The 'patch' tool... found at /usr/bin/patch
* Zlib development headers... found
* OpenSSL development headers... not found
* GNU Readline development headers... found

Some required software is not installed.

在使用 rvm、rbenv 或运行 ree 安装程序(通过所有选项)时会发生这种情况。虽然 openssl 已安装并正常工作:

openssl version                                                                                                             
OpenSSL 0.9.8r 8 Feb 2011

我尝试过 brewing openssl 但这也无济于事,所以再次将其删除。

我非常绝望,因为我无法让它运行。任何提示表示赞赏。

编辑:我错过了我只安装了 xcode 命令行工具而不是完整的 xcode 包的细节。

【问题讨论】:

    标签: ruby macos openssl osx-lion rvm


    【解决方案1】:

    您需要告诉./configure 脚本在哪里可以找到 openssl 标头

    RVM 转发任何--with* 标志以进行配置,因此您可以将--with-openssl-dir=... 传递给rvm 命令-> https://rvm.beginrescueend.com/packages/openssl/

    使用--with-openssl-dir=/usr 应该可以解决问题,但还有更多选项:--with-openssl-include-dir=/usr/include/openssl --with-openssl-lib-dir=/usr/lib(这可能是非标准安装)

    同样非常重要 - ./configure 将声称无法识别此标志,它将在 make 命令中使用 - 如果是 RVM,请检查 make.log。

    【讨论】:

      【解决方案2】:

      不要忘记通过https://github.com/kennethreitz/osx-gcc-installer 安装正确的库。显然,我使用的 xcode-command-line 工具缺少正确的开发头文件。

      有了 mpapis 的回答,应该可以告诉编译器正确的位置,但似乎这些选项在最新的安装程序中被忽略了。请参阅此论坛主题(第一篇文章中的第 3 点):http://discuss.joyent.com/viewtopic.php?id=25862

      【讨论】:

        猜你喜欢
        • 2019-03-02
        • 1970-01-01
        • 2014-01-16
        • 1970-01-01
        • 1970-01-01
        • 2011-12-14
        • 2021-01-12
        • 1970-01-01
        • 2012-03-08
        相关资源
        最近更新 更多