且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 Mac OS X Lion 上安装 Ruby 1.9.3 时出错

更新时间:2023-01-13 11:53:00

我自己也遇到过这个问题,经过大量的挣扎和搜索(没有一个站点有完整的解决方案),我终于想出了以下内容:

I had this problem myself, and after a great deal of struggle and searching (not one site had the complete solution), here's what I finally came up with:

curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
tar xzvf readline-6.2.tar.gz
cd readline-6.2
./configure --prefix=/usr/local
cd shlib
sed -e 's/-dynamic/-dynamiclib/' Makefile > Makefile.good
mv Makefile.good Makefile
cd ..
make
sudo make install
cd ..
rvm install 1.9.3 -C --with-readline-dir=/usr/local/