MAC OS X升级安装webrat

折腾了一周的环境问题,终于搞定:)

安装webrat/nokogiri的时候一直报错

Error: Cannot install *** for the arch(s) 'x86_64' because
Error: its dependency gettext is only installed for the archs 'i386 ppc'.
Error: Unable to execute port: architecture mismatch

前不久系统刚升级到MAC OS X 10.6.5,xcode 也是最新版本3.2.5
https://trac.macports.org/wiki/Migration,正如第一段话所说我真的很不幸。。。
“If you upgrade to a new OS version (e.g. from Leopard to Snow Leopard) or migrate to a new machine with a different type of CPU (e.g. PowerPC to Intel), you may get lucky and have your ports keep working, but in general, things will break.”

没办法,重装xcode跟macports吧

1. XCODE 卸载与安装

sudo /Developer/Library/uninstall-devtools -mode=all

sudo rm -rf /Developer/Library/Xcode/

之后去http://developer.apple.com/technologies/xcode.html下载最新版本,3.6G。。
安装

2. Ports重装

先导出已安装的sudo port installed >installed_ports.txt
卸载:sudo port -f uninstall installed
安装,按之前txt中的列表安装, sudo port install x1 x2 x3

3. 保险起见按照官方文档里的说法注释掉了macports.conf文件中下面一行
universal_archs i386 ppc

4. 收工,安装webrat跟nokogiri,成功!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值