【发布时间】:2015-10-07 14:58:31
【问题描述】:
我在 Yosemite 上安装的 MacPorts 无法在 El Capitan 上运行,因为它尚不受支持。我想在此处删除 Port 安装,但无法运行任何 Port 命令。有谁知道如何清理它?
在运行任何端口命令时,我收到以下错误:
Error: Current platform "darwin 15" does not match expected platform "darwin 14"
Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration
OS platform mismatch
while executing
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch
【问题讨论】:
-
这里是卸载指南 - guide.macports.org/chunked/…
-
感谢您的回复。我已经检查过了。问题是由于处于测试阶段,我无法运行 port 命令本身。安装需要 darwin 14(优胜美地),而安装的操作系统是 darwin 15(即 el capitan)
-
我认为第二个命令(sudo rm -rf \ /opt/local \ etc.)应该足以清理所有文件,即使端口不工作
-
第二个命令总是不够,因为 MacPorts 偶尔会在
/opt/local之外安装文件。正确的做法是从源代码重新安装 MacPorts,如 guide.macports.org/#installing.macports.source 中所述。 -
感谢您的回复。我尝试从源代码编译。我收到错误:论坛中的“Foundation library not found”似乎是一个没有解决方案的错误,特别是因为我确实有基础库(以及 Xcode 和开发工具)。
标签: macos macports osx-elcapitan