如何删除“不支持OS”(即El Capitan公共beta)上的MacPorts ?

时间:2022-05-27 07:39:51

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?

我在约塞米蒂上安装的MacPorts设备不能在El Capitan上使用,因为它还不受支持。我想在这里删除端口安装,但是我不能运行任何端口命令。有人知道怎么清理吗?

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 个解决方案

#1


20  

This solution worked for me, without remove it:

这个解决方案对我来说是有效的,没有删除它:

  • xcode-select --install
  • xcode-select——安装
  • xcodebuild -license
  • xcodebuild许可证
  • wget https://distfiles.macports.org/MacPorts/MacPorts-2.3.3.tar.bz2
  • wget https://distfiles.macports.org/MacPorts/MacPorts-2.3.3.tar.bz2
  • tar xzvf MacPorts-2.3.3.tar.bz2
  • 焦油xzvf MacPorts-2.3.3.tar.bz2
  • cd MacPorts-2.3.3
  • cd MacPorts-2.3.3
  • ./configure && make && sudo make install
  • ./配置、制造、安装
  • cd ../
  • cd . . /
  • rm -rf MacPorts-2.3.3*
  • rm射频MacPorts-2.3.3 *

Source

#2


12  

I just went ahead and manually removed the files (using rm):

我只是手动删除了文件(使用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

It didn't seem to leave any leftovers or break anything.

它似乎没有留下任何残羹剩饭,也没有打碎任何东西。

One thing to note however is that mactex seems to have been installed in the same directory so that got removed as well. I didn't realize that I had that in the same directory. If you're going to repeat the same steps, keep this in mind.

不过需要注意的是,mactex似乎已经安装在同一个目录中,因此也被删除了。我没有意识到我在同一个目录下。如果你要重复同样的步骤,记住这一点。

#3


6  

What I did successfully on my El Capitan:

我在El Capitan上做的很成功:

  1. xcode-select --install
  2. xcode-select——安装
  3. xcodebuild -license
  4. xcodebuild许可证
  5. Reinstall MacPorts by using the correct *.pkg matching your OSX from https://www.macports.org/install.php
  6. 使用正确的*重新安装MacPorts。从https://www.macports.org/install.php与您的OSX匹配。
  7. done.
  8. 完成了。

#4


0  

wget is fetching a bz2 file but unzip instructions are for gz. Try the following instead

wget正在获取一个bz2文件,但是解压指令是针对gz的。试试以下

tar xjvf MacPorts-2.3.3.tar.bz2

The rest worked fine on El Capitan.

其余的在El Capitan上工作得很好。

Thanks.

谢谢。

#1


20  

This solution worked for me, without remove it:

这个解决方案对我来说是有效的,没有删除它:

  • xcode-select --install
  • xcode-select——安装
  • xcodebuild -license
  • xcodebuild许可证
  • wget https://distfiles.macports.org/MacPorts/MacPorts-2.3.3.tar.bz2
  • wget https://distfiles.macports.org/MacPorts/MacPorts-2.3.3.tar.bz2
  • tar xzvf MacPorts-2.3.3.tar.bz2
  • 焦油xzvf MacPorts-2.3.3.tar.bz2
  • cd MacPorts-2.3.3
  • cd MacPorts-2.3.3
  • ./configure && make && sudo make install
  • ./配置、制造、安装
  • cd ../
  • cd . . /
  • rm -rf MacPorts-2.3.3*
  • rm射频MacPorts-2.3.3 *

Source

#2


12  

I just went ahead and manually removed the files (using rm):

我只是手动删除了文件(使用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

It didn't seem to leave any leftovers or break anything.

它似乎没有留下任何残羹剩饭,也没有打碎任何东西。

One thing to note however is that mactex seems to have been installed in the same directory so that got removed as well. I didn't realize that I had that in the same directory. If you're going to repeat the same steps, keep this in mind.

不过需要注意的是,mactex似乎已经安装在同一个目录中,因此也被删除了。我没有意识到我在同一个目录下。如果你要重复同样的步骤,记住这一点。

#3


6  

What I did successfully on my El Capitan:

我在El Capitan上做的很成功:

  1. xcode-select --install
  2. xcode-select——安装
  3. xcodebuild -license
  4. xcodebuild许可证
  5. Reinstall MacPorts by using the correct *.pkg matching your OSX from https://www.macports.org/install.php
  6. 使用正确的*重新安装MacPorts。从https://www.macports.org/install.php与您的OSX匹配。
  7. done.
  8. 完成了。

#4


0  

wget is fetching a bz2 file but unzip instructions are for gz. Try the following instead

wget正在获取一个bz2文件,但是解压指令是针对gz的。试试以下

tar xjvf MacPorts-2.3.3.tar.bz2

The rest worked fine on El Capitan.

其余的在El Capitan上工作得很好。

Thanks.

谢谢。