MAC OS X升级安装webrat
庞书
2023-12-01
折腾了一周的环境问题,终于搞定:)
安装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,成功!