安装*后*更改 macports 安装目录
我在一台计算机上安装了 macports,我希望将整个 /opt 树复制到另一台计算机。除了,在新计算机上(都是带有 Lion 的 Intel Mac,所以我希望避免重新编译所有软件包)我有一个额外的硬盘,所以我想在 /Volumes/extradrive/opt 上安装 macports
我可以复制 macports从旧计算机转移到新计算机,然后在某处更改目录路径?我猜不会,因为所有软件都已编译为 /opt。如果是这样,我可以轻松地在新计算机上重新创建整个 macports 吗?
I have macports installed on one computer, and I was hoping to just copy the entire /opt tree to another computer. Except, on the new computer (both are Intel Macs with Lion, so I am hoping to avoid recompiling all the packages) I have an extra hard disk, so I want to install macports on /Volumes/extradrive/opt
Can I copy the macports tree over from the old computer to the new computer and then change the directory path somewhere? I am guessing not, because all the software has been compiled expecting /opt. If so, can I recreate the entire macports on the new computer easily?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,可以在两台计算机上维护一个 MacPorts
/opt
目录,并在/opt
之外进行一次安装,前提是它们都运行相同版本的 OSX 并且代码。我在自己的机器上执行相同任务的快速而肮脏的方法是:其中
$macports_host_machine
是安装 MacPorts 的机器(在/opt/
中)。现在,将/Volumes/extradrive/opt
链接到/opt
:我还执行此附加步骤
来更改符号链接的所有权和权限。
之后,我仅在
$macports_host_machine
上维护/opt
目录,并定期与所有其他计算机(运行相同版本的 OSX 和 XCode)进行 rsync。前面的说明是假设 MacPorts 安装在
$macports_host_machine
上的/opt
中,如果 MacPorts 安装在其他非标准位置,则应替换/ opt
与$macports_host_machine
上的安装路径无关Yes, it is possible to maintain a single MacPorts
/opt
directory on two machines and have one installation outside of/opt
, if they are both running the same version of OSX and XCode. The quick and dirty way that I do the same task on my own machines is:where
$macports_host_machine
is the machine on which MacPorts is installed (in/opt/
). Now, link/Volumes/extradrive/opt
to/opt
:I also perform this additional step
to change ownership and permissions of the symbolic link.
After that, I maintain the
/opt
directory on only$macports_host_machine
and rsync with all of my other machines (running the same version of OSX and XCode) periodically.The previous instructions were written assuming that MacPorts was installed in
/opt
on$macports_host_machine
, if MacPorts was installed in some other non-standard location, you should replace/opt
with whatever the installation path is on$macports_host_machine