Snow Leopard 上的 Macports 和 Rubygems 问题
我已经安装了 Snow Leopard 而不是 Leopard,并且已经安装了 macports 和 rubygems。 这是常规安装,而不是干净的“存档和擦除”安装。
事实证明,SL 有 64 位版本的共享库,许多开发实用程序无法工作。 例如,“port”命令抱怨不兼容的 tcl 库,或者 ruby 无法加载 32 位包。
解决这些问题最简单的方法是什么?
I've installed Snow Leopard over Leopard with macports and rubygems already installed. This was regular install, not a clean "archive and erase" install.
It turned out, that SL has 64bit versions of shared libraries and many development utilities do not work. For example, "port" command complains on incompatible tcl library, or ruby cannot load 32bit bundles.
What is the easiest way to solve these issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我已经在谷歌上搜索了大约 4 天的答案,最后想出了一份关于修复 macports 和 rubygems 的分步手册:
http://oleganza.tumblr.com/post/127709563/snow-leopard-with-legacy-macports-and-rubygems
简而言之:为了正确使用 macports 和 rubygems,您必须:
从源代码安装 trunk macports(或在发布时使用 1.8 版本)
为“gem install with 64bit Architecture”添加别名
重新安装所有端口(尚未自动化)
重新安装所有 gem(100% 自动化)
这将占用您 10-20 分钟的个人时间,另外还需要 20 分钟
分钟的机器时间来构建和安装东西。
我很高兴获得更多答案,以便解决我们以后可能遇到的其他问题。
I was googling for the answer for about 4 days already and finally came up with a step-by-step manual on fixing macports and rubygems:
http://oleganza.tumblr.com/post/127709563/snow-leopard-with-legacy-macports-and-rubygems
In short: for proper use of macports and rubygems you would have to:
Install trunk macports from source (or use 1.8 version when it is released)
Add alias for "gem install with 64bit architecture"
Reinstall all ports (not automated yet)
Reinstall all gems (100% automated)
This would take 10-20 minutes of your personal time and another 20
minutes of machine time in order to build and install stuff.
I would be glad to get more answers in order to fix other issues we might meet later.
由于强制 MacPorts 重新编译所有端口(按正确的顺序)确实很困难,所以我只是这样做:
然后安装 MacPorts 1.8,并从 /opt.old/local/etc/ 带回您需要的任何配置
,否则,您将得到抱怨现有库架构的各种错误(例如“命令输出:ld:警告:在 /opt/local/lib/libz.dylib 中,文件不符合所需架构”)。
这不像“已安装端口卸载”那么干净,但对我来说工作速度快且足够好。
Since it's really hard to force MacPorts to recompile all ports (in the proper order), I just did:
Then install MacPorts 1.8, and bring back any configs you need from /opt.old/local/etc/
Otherwise, you'll get assorted errors complaining about your existing libs' architecture, (e.g. "Command output: ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture").
This isn't as clean as 'port uninstall installed' but works fast and good enough for me.
Richard Dooling 的 雪豹上的 MacPorts 解释说,要修复升级到 Snow Leopard 后损坏的旧版 MacPorts 安装,您应该下载并安装 新的兼容版本覆盖旧版本,然后只需按照迁移说明 - 这也说同样的。
Richard Dooling's MacPorts On Snow Leopard explains that to fix the older install of MacPorts, which is broken after the upgrade to Snow Leopard, you should just download and install the new compatible version over the old one and then simply follow the migration instructions - which also say the same.