14

The MacPorts installation that I had on Yosemite doesn't work on the El Capitan since it isn't supported yet. I want to remove the Port installation here but I'm not able to run any of the Port commands. Does anyone have an idea how to clean it up?

On running any port command, I get the following error:

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
4

4 回答 4

24

这个解决方案对我有用,没有删除它:

资源

于 2015-10-01T01:19:45.633 回答
13

我只是继续手动删除文件(使用 rm):

sudo rm -rf /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \
    ~/.macports

它似乎没有留下任何剩菜或破坏任何东西。

但是要注意的一件事是 mactex 似乎已安装在同一目录中,因此也被删除了。我没有意识到我在同一个目录中。如果您要重复相同的步骤,请记住这一点。

于 2015-07-20T04:06:06.787 回答
7

我在我的 El Capitan 上成功做了什么:

  1. xcode-选择--安装
  2. xcodebuild-许可证
  3. 使用与您的 OSX 匹配的正确 *.pkg 从https://www.macports.org/install.php重新安装 MacPorts
  4. 完毕。
于 2016-01-09T09:12:17.927 回答
1

wget 正在获取 bz2 文件,但解压缩指令适用于 gz。请尝试以下操作

tar xjvf MacPorts-2.3.3.tar.bz2

其余的在 El Capitan 上运行良好。

谢谢。

于 2015-10-05T20:25:20.320 回答