Macports and Rubygems issues on Snow Leopard

元气小坏坏 提交于 2019-12-23 04:52:52

问题


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?


回答1:


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:

  1. Install trunk macports from source (or use 1.8 version when it is released)

  2. Add alias for "gem install with 64bit architecture"

  3. Reinstall all ports (not automated yet)

  4. 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.




回答2:


Since it's really hard to force MacPorts to recompile all ports (in the proper order), I just did:

mv /opt /opt.old

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.




回答3:


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.



来源:https://stackoverflow.com/questions/1024833/macports-and-rubygems-issues-on-snow-leopard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!