使用 macports 指定要安装的版本

发布于 2024-10-20 21:16:46 字数 84 浏览 1 评论 0原文

我想在 mac os x leopard 上使用 macports 安装特定版本的 gdb 和 gcc,不是最后一个,而是 gdb 的 6.8。是否可以?

I would like to install a specific version of gdb and gcc with macports on mac os x leopard, not the last one, but the 6.8 for gdb. Is it possible?

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

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

发布评论

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

评论(4

神也荒唐 2024-10-27 21:16:46

这是可能的。这只是复杂而乏味的。它最近在文档中列出了

步骤

转至 macports trac 并找到您要查找的软件包为了。 这是 subversion 的链接,即我将在示例中使用的包。

单击端口文件
单击 portfile

单击修订日志(右上角)
单击修订日志

仔细查看修订版本,直到找到所需的版本。记住修订号。
在修订日志中查找版本

在此示例中,我正在查找 1.7 版的 subversion。

注明修订号。您需要在该修订版中签出该子目录的版本。

cd /tmp
svn co http://svn.macports.org/repository/macports/trunk/dports/devel/subversion --revision 106629

然后 cd 进入该文件夹并运行安装

cd subversion
sudo port install

然后它应该被默认选中。您可以检查

sudo port installed subversion
The following ports are currently installed:
  subversion @1.7.10_0 (active)
  subversion @1.8.8_0
  subversion @1.8.10_0

It is possible. It's just convoluted and tedious. It's listed in the documentation these days.

Steps

Go to macports trac and find the package you're looking for. This is the link for subversion, which is the package I'll be using in the example.

Click the PortFile
Click the portfile

Click Revision Log (top right)
Click the revision log

Pour through the revisions until you find the version you're looking for. Remember the revision number.
Finding the version in the revision log

In this example I'm looking for version 1.7 of subversion.

With that revision number noted. You need to checkout the version of that subdirectory at that revision.

cd /tmp
svn co http://svn.macports.org/repository/macports/trunk/dports/devel/subversion --revision 106629

Then cd into the folder and run the install

cd subversion
sudo port install

Then it should become selected by default. You can check with

sudo port installed subversion
The following ports are currently installed:
  subversion @1.7.10_0 (active)
  subversion @1.8.8_0
  subversion @1.8.10_0
暗藏城府 2024-10-27 21:16:46

当我在试图弄清楚如何下载旧版本的curl时刚刚遇到这个问题,我想我应该分享一个更新:

当前接受的答案不再对我有用。这是 MacPorts 2.2.0 的情况。我所做的如下。

我开始按照此处的说明进行操作。我最终使用了 SVN 方法,因为第一种方法不起作用。我没有意识到我错过了关键的一步。

我发现另一篇文章建议将下载的目录移动到 /private/tmp 。完成此操作后,我cd进入新目录,并在sudo port install之后我能够安装旧版本。

我使用的是运行 OS X 10.8 的 Mac,因此您的情况可能会有所不同。

As I just came across this question when trying to figure out how to download an older version of curl, I thought I'd share an update:

The currently accepted answer did not work for me any longer. This is with MacPorts 2.2.0. What I did was the following.

I started following the directions located here. I ended up using the SVN method, since the first method didn't work. What I didn't realize is that I was missing a critical step.

I found another post that suggested moving the downloaded directory to /private/tmp. After doing this, I cd into the new directory and after a sudo port install I was able to install the older version.

I am on a Mac running OS X 10.8, so your mileage may vary.

眼泪淡了忧伤 2024-10-27 21:16:46

这篇文章很旧..但指定版本是可能的。例如,我想安装 ZeroMQ 版本 3.2.2,所以我使用:

sudo port install zmq @3.2.2

访问 MacPorts 网站并搜索以查看他们是否有您想要的内容总是有帮助的。

This post is old.. but specifying a version is possible. For example I want to install ZeroMQ version 3.2.2 so I use:

sudo port install zmq @3.2.2

And it always helps to goto the MacPorts website and search to see if they have what you are looking for.

沙沙粒小 2024-10-27 21:16:46

据我所知,根本不可能安装除确切版本之外的其他版本,除非某个版本有特定的端口。

您唯一能做的就是从 Macports subversion 存储库中获取所需版本的端口文件。

在你的情况下,当前版本只有 gdb 7.2 可用,没有变体,也没有其他版本 - 抱歉:)

As far as I know it is not possible at all to install other versions than the exact version, unless there is a specific port for a certain version.

The only thing you could do is fetch the portfile of the desired version from the Macports subversion repository.

In your case only gdb 7.2 is available on the current version, no variants and no other versions - sorry :)

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