在Mac OS X10.10下sudo gem install curses 返回如下错误:

apple@kissAir: ruby_src$sudo gem install curses

Password:

Fetching: curses-1.0.1.gem (100%)

Building native extensions.  This could take a while...

ERROR:  Error installing curses:

ERROR: Failed to build gem native extension.

/Users/apple/.rvm/rubies/ruby-2.1.3/bin/ruby extconf.rb

checking for tgetent() in -ltinfo... no

checking for tgetent() in -ltermcap... yes

checking for ncurses.h... yes

checking for initscr() in -lncursesw... no

checking for initscr() in -lncurses... yes

header: ncurses.h

library: ncurses

checking for beep()... yes

checking for bkgd()... yes

checking for bkgdset()... yes

checking for curs_set()... yes

checking for deleteln()... yes

checking for doupdate()... yes

checking for flash()... yes

checking for getbkgd()... yes

checking for getnstr()... yes

checking for init()... no

checking for init in ncurses.h... no

checking for isendwin()... yes

checking for keyname()... yes

checking for keypad()... yes

checking for resizeterm()... yes

checking for scrl()... yes

checking for set()... no

checking for set in ncurses.h... no

checking for setscrreg()... yes

checking for ungetch()... yes

checking for wattroff()... yes

checking for wattron()... yes

checking for wattrset()... yes

checking for wbkgd()... yes

checking for wbkgdset()... yes

checking for wdeleteln()... yes

checking for wgetnstr()... yes

checking for wresize()... yes

checking for wscrl()... yes

checking for wsetscrreg()... yes

checking for def_prog_mode()... yes

checking for reset_prog_mode()... yes

checking for timeout()... yes

checking for wtimeout()... yes

checking for nodelay()... yes

checking for init_color()... yes

checking for wcolor_set()... yes

checking for use_default_colors()... yes

checking for newpad()... yes

checking for ESCDELAY in ncurses.h... yes

checking for TABSIZE in ncurses.h... yes

checking for COLORS in ncurses.h... yes

checking for COLOR_PAIRS in ncurses.h... yes

checking for function curses_version in ncurses.h... yes

checking for variable curses_version in ncurses.h... no

creating Makefile

make "DESTDIR=" clean

make "DESTDIR="

compiling curses.c

linking shared-object curses.bundle

ld: warning: directory not found for option '-L/Users/mpapis/.sm/pkg/active/lib'

ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architecture x86_64

collect2: error: ld returned 1 exit status

make: *** [curses.bundle] Error 1

make failed, exit code 2


主要错误点是找不到符号dyld_stub_binding_helper,网上搜了一下,解决方法是将Xcode中的deployment target从低版本改为高版本,但我这个没用Xcode编译啊!想了一下,看上面编译器用的应该是gcc(4.9),要不用clang试试看呐?!

apple@kissAir: ruby_src$type gcc

gcc is /opt/local/bin/gcc

apple@kissAir: ruby_src$ls -lh /opt/local/bin/gcc

lrwxr-xr-x  1 root  admin    39B 10 27 06:15 /opt/local/bin/gcc -> /usr/local/Cellar/gcc/4.9.1/bin/gcc-4.9

apple@kissAir: ruby_src$sudo mv /opt/local/bin/gcc old_gcc

Password:

apple@kissAir: ruby_src$type gcc

gcc is /usr/bin/gcc

apple@kissAir: ruby_src$gcc -v

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)

Target: x86_64-apple-darwin14.0.0

Thread model: posix

apple@kissAir: ruby_src$clang -v

Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)

Target: x86_64-apple-darwin14.0.0

Thread model: posix


现在gcc实际连接在clang上了,遂再次安装gem:

apple@kissAir: ruby_src$sudo gem install curses

Building native extensions.  This could take a while...

Successfully installed curses-1.0.1

Parsing documentation for curses-1.0.1

Installing ri documentation for curses-1.0.1

Done installing documentation for curses after 3 seconds

1 gem installed


哦鸟!看一下导出的符号:

nm /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/curses.bundle

U _COLORS

U _COLOR_PAIRS

U _COLS

U _ESCDELAY

0000000000000732 T _Init_curses

U _LINES

U _TABSIZE

U ___sprintf_chk

U ___stack_chk_fail

U ___stack_chk_guard

U _beep

U _can_change_color

U _cbreak

U _color_content

U _curs_set

U _curses_version

U _def_prog_mode

U _delwin

U _doupdate

U _echo

U _endwin

U _flash

U _getbegx

U _getbegy

U _getcurx

U _getcury

U _getmaxx

U _getmaxy

U _getmouse

U _has_colors

U _idlok

U _init_color

U _init_pair

U _initscr

U _isendwin

U _keyname

U _keypad

U _mouseinterval

U _mousemask

U _mvwin

U _newpad

U _newwin

U _nl

U _nocbreak

U _nodelay

U _noecho

U _nonl

U _noraw

U _pair_content

U _pnoutrefresh

U _prefresh

U _raw

U _rb_ary_new3

U _rb_block_given_p

U _rb_cData

U _rb_cFalseClass

U _rb_cFixnum

U _rb_cFloat

U _rb_cNilClass

U _rb_cObject

U _rb_cSymbol

U _rb_cTrueClass

U _rb_check_typeddata

U _rb_data_typed_object_alloc

U _rb_define_alloc_func

U _rb_define_class_under

U _rb_define_const

U _rb_define_method

U _rb_define_module

U _rb_define_module_function

U _rb_define_module_under

U _rb_eArgError

U _rb_eRuntimeError

U _rb_eSecurityError

U _rb_fix2int

U _rb_gc_register_address

U _rb_gc_unregister_address

U _rb_isprint

U _rb_locale_str_new

U _rb_locale_str_new_cstr

U _rb_num2int

U _rb_num2long

U _rb_num2uint

U _rb_obj_alloc

U _rb_obj_class

U _rb_raise

U _rb_safe_level

U _rb_scan_args

U _rb_secure

U _rb_set_end_proc

U _rb_str_export_locale

U _rb_str_new_cstr

U _rb_string_value

U _rb_string_value_cstr

U _rb_thread_call_without_gvl

U _rb_undef_method

U _rb_yield

U _reset_prog_mode

U _resizeterm

U _ruby_xfree

U _ruby_xmalloc

U _scrollok

U _start_color

U _stdscr

U _subwin

U _ungetch

U _ungetmouse

U _use_default_colors

U _waddch

U _waddnstr

U _wattr_off

U _wattr_on

U _wattrset

U _wbkgd

U _wbkgdset

U _wborder

U _wclear

U _wclrtoeol

U _wcolor_set

U _wdelch

U _wgetch

U _wgetnstr

U _winch

U _winsch

U _winsdelln

U _wmove

U _wnoutrefresh

U _wrefresh

U _wresize

U _wscrl

U _wsetscrreg

U _wtimeout

U dyld_stub_binder

最后把gcc连接给它还原本色吧:

apple@kissAir: ~$gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/4.9.1/libexec/gcc/x86_64-apple-darwin14.0.0/4.9.1/lto-wrapper

Target: x86_64-apple-darwin14.0.0

Configured with: ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gcc/4.9.1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc
--with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion='Homebrew
gcc 4.9.1' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib

Thread model: posix

gcc version 4.9.1 (Homebrew gcc 4.9.1)

apple@kissAir: ~$


Mac OS X安装native gem提示找不到 dyld_stub_binding_helper的更多相关文章

  1. Xamarin+Prism开发详解四:简单Mac OS 虚拟机安装方法与Visual Studio for Mac 初体验

    Mac OS 虚拟机安装方法 最近把自己的电脑升级了一下SSD固态硬盘,总算是有容量安装Mac 虚拟机了!经过心碎的安装探索,尝试了国内外的各种安装方法,最后在youtube上找到了一个好方法. 简单 ...

  2. wget Mac OS 下安装

    wget是一个从网络上自动下载文件的自由工具,支持通过HTTP.HTTPS.FTP三个最常见的TCP/IP协议下载,并可以使用HTTP代理. 下面介绍如何在Mac OS 下安装Wget 下载最新版的 ...

  3. Mac OS X安装OpenGL

    Mac OS X安装OpenGL 安装最新的cmake brew install cmake brew upgrade cmake 安装glew brew install glew 安装GLTools ...

  4. TensorFlow 安装官方教程:Ubuntu 安装,Mac OS X 安装,Windows 安装

    从我的使用体验来看  Ubuntu 是最好的, Mac 没有显卡,后期跑大项目比较鸡肋,Windows 安装各种依赖各种坑.Ubuntu 安装 TensorFlow 方便,后面安装  TensorFl ...

  5. 关于在Mac OS下安装npm与cnpm的ERR! Darwin 15.0.0解决办法

    mac os安装好了很久了,不过没怎么用,昨天想要体验一下大神们推荐的黑苹果系统用起来怎么样(关于安装黑苹果的可以到我的简书去看相关文章),于是乎,打开久违的vmware,看着咬一口的苹果进度图,心中 ...

  6. 在 Virtual Box 安装 Mac Os 并安装 Qt 开发应用

    导读 由于 Beslyric-for-X 项目开发需要,开始尝试在 Mac Os 下开发 Qt 应用.尝试成功后,记录于此,希望对有类似需求的人有所帮助. 本文以开发 Beslyric-for-X 为 ...

  7. 以 MAMP 为 Mac OS X 安装并设置 PHP开发环境

    PHP 页需要通过 Web 服务器处理.因此,要在 Dreamweaver 中使用 PHP 进行开发,您需要访问支持 PHP 的 Web 服务器和 MySQL 数据库.phpMyAdmin 也很实用, ...

  8. 在Mac OS上安装Vagrant和Docker的教程

    转载于:http://www.itxuexiwang.com/a/shujukujishu/redis/2016/0216/128.html?1455808640 当听到很多人在说Docker是多么多 ...

  9. Mac OS X安装OpenCV 3.1.0

    在我的上一篇文章“”中已经介绍了Linux下OpenCV的安装配置方法,在这里仅仅记录Mac上相对于Linux的一点点差异. 1. 安装依赖包 Mac上安装软件包使用的工具是brew,用此来替代Ubu ...

随机推荐

  1. Intent和PendingIntent的区别

    intent英文意思是意图,pending表示即将发生或来临的事情.  PendingIntent这个类用于处理即将发生的事情.比如在通知Notification中用于跳转页面,但不是马上跳转.  I ...

  2. Android 5.1.1 源码目录结构

    点击打开链接 最近公司培训新同事,我负责整理一点关于android的基础知识,遥想当年,刚接触android,也是一头雾水, 啥都不懂,就是靠看文档和视频,对android有一个初步了解,然后就通过查 ...

  3. UNIX网络编程——TCP带外数据小结

    带外数据概念实际上时向接收端传送三个不同的信息:(1)发送端进入紧急模式这个事实.接收进程得以通知这个事实的手段不外乎SIGURG信号或select调用.本通知在发送进程发送带外字节后由发送端TCP立 ...

  4. Request中Attribute 和 Parameter 的区别

    Attribute 和 Parameter 的区别 (1)HttpServletRequest类有setAttribute()方法,而没有setParameter()方法 (2)当两个Web组件之间为 ...

  5. 看人装X,我就来气,开启极限装X模式

    本文书写,纯属扯淡,请勿观看 4进制比二进制更合理,在01的状态中添加了两种状态,从无到有和从有到无的两种过度状态. 如果非要用数值表示,用概率表示.01作为近代计算机的基础,但终究淘汰,构成下一代计 ...

  6. DB 查询分析器 方便地创建DB2自定义函数

    DB 查询分析器 方便地创建DB2自定义函数                           马根峰            (广东联合电子服务股份有限公司, 广州 510300) 摘要       ...

  7. Chipmunk僵尸物理对象的出现和解决(八)

    如何解决? 等到碰撞方法返回后在调用Star类方法.碰撞方法在物理引擎的一帧内应该会处理完成,在下一帧里碰撞回调已经结束.所以我们将Star类方法的调用放到下一帧里执行即可,代码如下: //... @ ...

  8. Oracle中添加自动编号的序列

    1. 创建表T_Test create table T_Test(id int  ,address char(25), pay int); 2. 创建自增序列 create sequence SEQ_ ...

  9. (十)弹出框Alert与ActionSheet

    第一种方式:中间弹窗 从中间弹出的窗口称为AlertView. 可以设置多个按钮,取消按钮会放在对右端或者最下端,按钮超过两个,会竖着排列. UIAlertView *alert = [[[UIAle ...

  10. 理解WebKit和Chromium: 网页渲染的基本过程

    转载请注明原文地址:http://blog.csdn.net/milado_nju ## 概述 前面介绍了一些渲染引擎的功能,包括网络,资源加载,DOM树,RenderObject树等等,但是,给人以 ...