/opt/local/bin
如果没有添加到~/.bashrc
里即可。sudo port selfupdate
更新ports tree和macports版本
----下面是用macports来安装ror环境来说明macports的好用之处:
以前对于ruby的安装是比较麻烦的,需要gnu的readline(比较容易出现很多问题,譬如ldconfig 问题)
现在用macports可以很方便的来安装ruby:
---> Computing dependencies for ruby
---> Fetching gperf
---> Attempting to fetch gperf-3.0.4.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/gperf
---> Verifying checksum(s) for gperf
---> Extracting gperf
---> Configuring gperf
---> Building gperf
---> Staging gperf into destroot
---> Installing gperf @3.0.4_0
---> Activating gperf @3.0.4_0
---> Cleaning gperf
---> Fetching libiconv
---> Attempting to fetch libiconv-1.13.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/libiconv
---> Verifying checksum(s) for libiconv
---> Extracting libiconv
---> Applying patches to libiconv
---> Configuring libiconv
---> Building libiconv
---> Staging libiconv into destroot
---> Installing libiconv @1.13_0
---> Activating libiconv @1.13_0
---> Cleaning libiconv
---> Fetching ncursesw
---> Attempting to fetch ncurses-5.7.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/ncurses
---> Verifying checksum(s) for ncursesw
---> Extracting ncursesw
---> Configuring ncursesw
---> Building ncursesw
---> Staging ncursesw into destroot
---> Installing ncursesw @5.7_0
---> Activating ncursesw @5.7_0
---> Cleaning ncursesw
---> Fetching ncurses
---> Verifying checksum(s) for ncurses
---> Extracting ncurses
---> Configuring ncurses
---> Building ncurses
---> Staging ncurses into destroot
---> Installing ncurses @5.7_0
---> Activating ncurses @5.7_0
---> Cleaning ncurses
---> Fetching zlib
---> Attempting to fetch zlib-1.2.3.tar.bz2 from http://distfiles.macports.org/zlib
---> Verifying checksum(s) for zlib
---> Extracting zlib
---> Applying patches to zlib
---> Configuring zlib
---> Building zlib
---> Staging zlib into destroot
---> Installing zlib @1.2.3_3
---> Activating zlib @1.2.3_3
---> Cleaning zlib
---> Fetching openssl
---> Attempting to fetch openssl-0.9.8k.tar.gz from http://distfiles.macports.org/openssl
---> Verifying checksum(s) for openssl
---> Extracting openssl
---> Applying patches to openssl
---> Configuring openssl
---> Building openssl
---> Staging openssl into destroot
---> Installing openssl @0.9.8k_0+darwin
---> Activating openssl @0.9.8k_0+darwin
---> Cleaning openssl
---> Fetching readline
---> Attempting to fetch readline-6.0.tar.gz from ftp://ftp.dti.ad.jp/pub/GNU/readline
---> Verifying checksum(s) for readline
---> Extracting readline
---> Applying patches to readline
---> Configuring readline
---> Building readline
---> Staging readline into destroot
---> Installing readline @6.0.000_2+darwin
---> Activating readline @6.0.000_2+darwin
---> Cleaning readline
---> Fetching ruby
---> Attempting to fetch ruby-1.8.7-p174.tar.bz2 from ftp://ftp.ruby-lang.org/pub/ruby/1.8
---> Verifying checksum(s) for ruby
---> Extracting ruby
---> Applying patches to ruby
---> Configuring ruby
---> Building ruby
---> Staging ruby into destroot
---> Installing ruby @1.8.7-p174_0+darwin+thread_hooks
---> Activating ruby @1.8.7-p174_0+darwin+thread_hooks
---> Cleaning ruby
这样安装就可以将ruby及其所依赖的软件环境全部搭建好了,现在可以运行一下
port installed
来查看用port安装过的包及其版本号:
port installed
The following ports are currently installed:
gperf @3.0.4_0 (active)
libiconv @1.13_0 (active)
ncurses @5.7_0 (active)
ncursesw @5.7_0 (active)
openssl @0.9.8k_0+darwin (active)
readline @6.0.000_2+darwin (active)
ruby @1.8.7-p174_0+darwin+thread_hooks (active)
zlib @1.2.3_3 (active)
再下面来安装mysql:
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。