使用 Macports 有风险吗?
我正在考虑在我的 Mac 上安装 MacPorts,这样我就可以轻松访问 *nix 开发工具/应用程序。不过我想知道是否有任何风险。我可以接受时不时出现的不可避免的兼容性问题(听说 Snow Leopard + MacPorts 有问题),但我不希望我的“核心”Mac 系统的稳定性受到影响。我也很好奇 MacPorts 是否会增加任何重大的安全风险。
感谢您的帮助!
I'm considering installing MacPorts on my Mac so I can have easy access to *nix dev tools/apps. However, I'm wondering if there are any risks. I'm OK with the inevitable compatibility issue from time to time (hear Snow Leopard + MacPorts has issues) but I do not want the stability of my "core" Mac system to be affected. I'm also curious if MacPorts adds any significant security risks.
Appreciate the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
MacPorts 使用与任何普通程序完全不同的目录进行安装 - /opt/local。我从未见过它影响系统的稳定性(我什至不确定它会如何影响),而且我已经将它安装在许多计算机上好几年了。
MacPorts uses a totally different directory for its installs — /opt/local — than any normal program. I've never seen it affect the stability of a system (I'm not even sure how it would), and I've had it installed on many computers for several years.
我使用 Darvin/MacPorts 已经很多年了。我广泛使用它们。大约每年一次,重大更新后端口会以某种方式损坏,因此更容易删除它们并重新开始。这正是我所做的。我认为,考虑到 ports 为我处理所有开源软件节省了多少时间,花 2-3 小时重新安装它们是一项不错的投资。除非您使用以下命令,否则删除端口并不是一项简单的任务:
I use Darvin/MacPorts for years now. I use them extensively. Abut once a year after a significant update ports break in a way that it is easier to delete them and start anew. So that is exactly what I do. I figure that spending 2-3 hours reinstalling them is good investment considering how much time ports save handling all open source software for me. Removing ports is not a trivial tasks though unless you use this command:
MacPorts 可以使用您的路径变量玩一些有趣的游戏,优先于应优先安装的系统程序。如果有任何东西依赖于某个特定版本,像 python 和 ruby 这样的东西就会变得一团糟。但这通常不是永久性损坏。大多数问题可以通过卸载 macports 并恢复路径环境变量来解决。
MacPorts can play some funny games with your path variable, taking precedence over installed system programs that should have precedence. Stuff like python and ruby becomes kind of a mess, if there's anything that depends on some specific version. It's not typically permanent damage though. Most problems can be resolved by uninstalling macports, and reverting the path env variable.
您是否看过 Xcode IDE 附带的[相当长]的工具列表?例如,从 Snow Leopard 开始,它包括 gcc 4.0、4,2、llvm-gcc 和 Clang。
当您安装 Xcode 时,有一个可选安装会将许多标准 unix-y 开发工具填充到 /usr/bin/ 等中...自从 Xcode 开始以来,它们通常位于 /Developer/bin/ 中支持移动开发工具的能力。
就我个人而言,我拥有长期的 Unix 开发背景,包括跨平台工作,并且多年来一直是 Fink 和 MacPorts 的狂热用户。当进行 Leopard 的全新安装时,我从来没有抽出时间来安装 Fink/MacPorts,从那以后也没有必要这样做。
MacPorts 和 Fink 都很棒。如果您确实需要各种 Unix-y goop,那么任何一种都可以。然而,我只是想确保您了解 Mac OS X 附带的 Unix-y 开发潜力的全部。
(坚持使用系统工具会带来一些额外的优势;您的代码更容易被其他人和开发工具访问)已针对 Mac OS X 进行优化/修补/修复以实现最佳支持)
Have you looked at the [rather long] list of tools included with the Xcode IDE? As of Snow Leopard, it includes gcc 4.0, 4,2, llvm-gcc, and Clang, for example.
When you do the installation of Xcode, there is an optional install that will populate many of the standard unix-y dev tools into /usr/bin/, etc... They are normally found in /Developer/bin/ since Xcode started to support the ability to move the dev tools.
Personally, I have a long background of Unix development, including cross-platform work, and had been an avid Fink, then MacPorts, user for years. When doing a clean install of Leopard, I never got around to installing Fink/MacPorts and haven't had a need to since.
Both MacPorts and Fink are awesome. If you do need various Unix-y goop, either one will do nicely. However, I just wanted to make sure you were aware of the fullness of Unix-y development potential that ships with Mac OS X.
(Sticking with the system tools provides a few additional advantages; your code is more accessible to others and the dev tools have been optimized / patched / fixed for optimum support of Mac OS X)
没关系 - 我使用 MacPorts - 它不会覆盖路径中的任何现有应用程序。我已经使用它很多年了。然而,我确实完全破坏了我的 Mac Ports 安装 - 我现在无法安装或自我更新。但它只是阻止我安装任何新端口 - 它并没有影响任何现有端口的稳定性。
Its fine - I use MacPorts - it won't overwrite any of your existing apps in the Path. I've been using it for years. However, I did completely break my Mac Ports install - I now can't install or selfupdate. But its only stopped me from installing any new ports - it hasn't effected the stability of any existing ones.
我不知道目前这方面的情况,但在过去,我曾被以下场景所困扰:
不过我仍在使用 MacPorts。我只是在使用tar的时候注意一下。 MacPorts 非常节省时间,我离不开它。
I do not know about the current situation regarding this, but in the past, I have been burned in the following scenario:
I am still using MacPorts though. I just pay attention at the time of using tar. MacPorts is such a big timesaver that I couldn't do without it.