如何避免使用 MacPorts 安装不必要的依赖项?

发布于 2024-08-06 16:06:00 字数 249 浏览 1 评论 0原文

我尝试通过MacPorts(在Snow Leopard上)获取postgresql 8.4,但似乎依赖性是无穷无尽的 - 包括获取Snow Leopard中已经可用的旧版本的东西,厨房水槽,谁知道最终我是否会得到windows 7 ...

有没有办法只获取那些在 Mac 中从命令行运行东西绝对必需的依赖项?

特别是我试图避免安装旧版本的 python、Xorg 包等。

有什么想法吗?到目前为止,似乎最好完全避免使用 MacPort。

I've tried to get postgresql 8.4 via MacPorts (on Snow Leopard) but it seems that the dependencies are endless - including getting older version of stuff that is already available in Snow Leopard, kitchen-sink and who knows if eventually I end up with windows 7 ...

Is there a way to get only those dependancies absolutely necessary to run stuff from command line in Mac?

Especially I'm trying to avoid installing old version of python, Xorg packages and so on.

Any ideas? So far it seems that it is better to avoid MacPorts altogether.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暗地喜欢 2024-08-13 16:06:00

查看 postgresql84 的端口文件+ python 变体实际上意味着 python2.5 。您觉得烦人的大多数依赖项可能是由 python tkinter 模块对 Tk 默认情况下构建 Tk 的 X11 版本,而不是 +quartz 变体。您可以通过指定该变体并重新安装来更改它。处理变体的简单方法是将您通常想要用作默认值的选项添加到 /opt/local/etc/macports/variants.conf 中的选项。

不幸的是,目前,tk +quartz 变体构建在 Snow Leopard 上被破坏< /a>.因此,如果您不打算将 tkinter(或 IDLE)与 MacPorts python2.5 一起使用,则可以在不需要的模块出现后强制删除:

port installed
port -f uninstall tk Xft2 xorg-libX11 ...

您可能需要首先通过添加 进行试运行-y 选项可准确查看卸载的效果。

请注意,python26 端口有一个方便的 +no_tkinter 变体,一旦 portgresql 端口升级到 python2.6,该变体可能会很有用。

Looking at the port file for postgresql84, the +python variant for it actually means python2.5. Most of the dependencies you find annoying are probably being brought in by the python tkinter module dependency on Tk which by default builds an X11 version of Tk rather than the +quartz variant. You can change that by specifying that variant and reinstalling. The easy way to deal with variants is to add the options you normally want to use as defaults to those in /opt/local/etc/macports/variants.conf.

Unfortunately, at the moment, the tk +quartz variant build is broken on Snow Leopard. So, if you are not planning to use tkinter (or IDLE) with the MacPorts python2.5, you can force the removal after the fact of the unwanted modules:

port installed
port -f uninstall tk Xft2 xorg-libX11 ...

You might want to first do a dry-run by adding the -y option to see exactly what the effects of the uninstall will be.

Note, the python26 port has a handy +no_tkinter variant which could be useful once the portgresql ports are upgraded to python2.6.

可是我不能没有你 2024-08-13 16:06:00

这可能是一些繁重的工作(并且对于这种特定情况肯定违反了奥卡姆剃刀)...但是如果您确信您知道您不想要/需要哪些依赖项,那么它们始终可以在之后作为连字符分隔的参数传递港口呼叫:

port install sweetPort -depYouDontWant -depYouDontNeed ...

我知道距离 OP 已经有一段时间了,但我希望这对......某人有帮助。

It's potentially a bit of grunt work (and definitely violates Occam's razor for this particular scenario)... but if you're positive you know which dependencies you don't want/need, they can always be passed as hyphen-delimited args after the port call:

port install sweetPort -depYouDontWant -depYouDontNeed ...

I know it's been a while since the OP, but I hope this helps... somebody.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文