分享

install ruby to mac

 wintelsui 2014-01-26

1、在ruby官方上面提示在macbook中安装ruby可以执行这样一句话:% port install rubyy

2、但是要执行这个的前提是你已经安装了macport了,但是可恶的是你要安装macport的话要先安装mac上面的

     xcode才能安装macport

3、所以你应该先下载xcode_3.2.4_and_ios_sdk_4.1.dmg然后安装之后,去http://www./下载跟你mac系统一样的版本,我的机器mac版本是Snow Leopard 所以我下来了Snow Leopard 相关的版本MacPorts-1.9.2.pkg

4、接下来就可以安装ruby了

5、切换到root权限,然后执行 port install ruby

Html代码  收藏代码
  1. sh-3.2# port install ruby  
  2. --->  Computing dependencies for ruby  
  3. --->  Dependencies to be installed: libiconv gperf ncurses ncursesw openssl zlib readline  
  4. --->  Fetching gperf  
  5. --->  Attempting to fetch gperf-3.0.4.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gperf  
  6. --->  Verifying checksum(s) for gperf  
  7. --->  Extracting gperf  
  8. --->  Configuring gperf  
  9. --->  Building gperf  
  10. --->  Staging gperf into destroot  
  11. --->  Installing gperf @3.0.4_0  
  12. --->  Activating gperf @3.0.4_0  
  13. --->  Cleaning gperf  
  14. --->  Fetching libiconv  
  15. --->  Attempting to fetch libiconv-1.13.1.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/libiconv  
  16. --->  Verifying checksum(s) for libiconv  
  17. --->  Extracting libiconv  
  18. --->  Applying patches to libiconv  
  19. --->  Configuring libiconv  
  20. --->  Building libiconv  
  21. --->  Staging libiconv into destroot  
  22. --->  Installing libiconv @1.13.1_0  
  23. --->  Activating libiconv @1.13.1_0  
  24. --->  Cleaning libiconv  
  25. --->  Fetching ncursesw  
  26. --->  Attempting to fetch ncurses-5.7.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/ncurses  
  27. --->  Verifying checksum(s) for ncursesw  
  28. --->  Extracting ncursesw  
  29. --->  Applying patches to ncursesw  
  30. --->  Configuring ncursesw  
  31. --->  Building ncursesw  
  32. --->  Staging ncursesw into destroot  
  33. --->  Installing ncursesw @5.7_1  
  34. --->  Activating ncursesw @5.7_1  
  35. --->  Cleaning ncursesw  
  36. --->  Fetching ncurses  
  37. --->  Verifying checksum(s) for ncurses  
  38. --->  Extracting ncurses  
  39. --->  Applying patches to ncurses  
  40. --->  Configuring ncurses  
  41. --->  Building ncurses  
  42. --->  Staging ncurses into destroot  
  43. --->  Installing ncurses @5.7_1  
  44. --->  Activating ncurses @5.7_1  
  45. --->  Cleaning ncurses  
  46. --->  Fetching zlib  
  47. --->  Attempting to fetch zlib-1.2.5.tar.bz2 from http://distfiles./zlib  
  48. --->  Verifying checksum(s) for zlib  
  49. --->  Extracting zlib  
  50. --->  Applying patches to zlib  
  51. --->  Configuring zlib  
  52. --->  Building zlib  
  53. --->  Staging zlib into destroot  
  54. --->  Installing zlib @1.2.5_0  
  55. --->  Activating zlib @1.2.5_0  
  56. --->  Cleaning zlib  
  57. --->  Fetching openssl  
  58. --->  Attempting to fetch openssl-1.0.0b.tar.gz from http://distfiles./openssl  
  59. --->  Verifying checksum(s) for openssl  
  60. --->  Extracting openssl  
  61. --->  Applying patches to openssl  
  62. --->  Configuring openssl  
  63. --->  Building openssl  
  64. --->  Staging openssl into destroot  
  65. --->  Installing openssl @1.0.0b_0  
  66. --->  Activating openssl @1.0.0b_0  
  67. --->  Cleaning openssl  
  68. --->  Fetching readline  
  69. --->  Attempting to fetch readline61-001 from ftp://ftp.dti.ad.jp/pub/GNU/readline/readline-6.1-patches/  
  70. --->  Attempting to fetch readline61-002 from ftp://ftp.dti.ad.jp/pub/GNU/readline/readline-6.1-patches/  
  71. --->  Attempting to fetch readline-6.1.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/readline  
  72. --->  Verifying checksum(s) for readline  
  73. --->  Extracting readline  
  74. --->  Applying patches to readline  
  75. --->  Configuring readline  
  76. --->  Building readline  
  77. --->  Staging readline into destroot  
  78. --->  Installing readline @6.1.002_0  
  79. --->  Activating readline @6.1.002_0  
  80. --->  Cleaning readline  
  81. --->  Fetching ruby  
  82. --->  Attempting to fetch ruby-1.8.7-p302.tar.bz2 from ftp://ftp.iij.ad.jp/pub/lang/ruby/1.8  
  83. --->  Verifying checksum(s) for ruby  
  84. --->  Extracting ruby  
  85. --->  Applying patches to ruby  
  86. --->  Configuring ruby  
  87. --->  Building ruby  
  88. --->  Staging ruby into destroot  
  89. --->  Installing ruby @1.8.7-p302_0+thread_hooks  
  90. --->  Activating ruby @1.8.7-p302_0+thread_hooks  
  91. --->  Cleaning ruby  
  92. sh-3.2# port installed  
  93. The following ports are currently installed:  
  94.   gperf @3.0.4_0 (active)  
  95.   libiconv @1.13.1_0 (active)  
  96.   ncurses @5.7_1 (active)  
  97.   ncursesw @5.7_1 (active)  
  98.   openssl @1.0.0b_0 (active)  
  99.   readline @6.1.002_0 (active)  
  100.   ruby @1.8.7-p302_0+thread_hooks (active)  
  101.   zlib @1.2.5_0 (active)  
  102. sh-3.2# ruby -v  
  103. ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10]  
  

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多