macos - 如何在不进行迁移的情况下卸载 macports?
问题描述
我目前正在使用 MacOS High Sierra 10.13.5。我想在我的 macbook 上卸载 MacPorts。
根据此处的说明:
https://guide.macports.org/chunked/installing.macports.uninstalling.html
我应该做以下事情
$ sudo port -fp uninstall installed
这是我看到的回复:
Error: Current platform "darwin 17" does not match expected platform "darwin 16"
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
我真的需要在卸载之前先进行迁移吗?现在有办法直接安装吗?
解决方案
虽然绝大多数文件都安装在或中/opt/local
,但也有一些端口将文件安装在其他位置,例如由于操作系统要求。根据您是否安装了此类端口,Ken ( https://stackoverflow.com/a/50670316/2127896 ) 的解决方案可能会留下一些文件。/Applications/MacPorts
/Library/LaunchDaemons/org.macports.*
如果您想确保捕获所有文件,请按照MacPorts 迁移说明进行操作,直到第 3 步,即基本上重新安装 MacPorts 基础(例如通过运行安装程序)。这应该只需要几分钟。
然后,按照https://guide.macports.org/#installing.macports.uninstalling,即运行
$ sudo port -fp uninstall installed
然后是rm -rf
肯的回答中已经提到的命令。
推荐阅读
- python - 你能从 sklearn 网格搜索 (GridSearchCV) 中获得所有估计器吗?
- python - 如何让 SWIG 公开的 C++ 类表现得像 python 中的元组?
- java - 有没有最好的方法来检查 Java 中的证书吊销状态?
- vue.js - Nuxt 部署和 IE 11
- xamarin - 我可以向 Xamarin.Mac 中的 NSPopUpButton 项目添加额外信息吗?
- html - 带有图像的社交媒体分享按钮(Facebook、Linkedin、Twitter)
- javascript - UL 项目的完整计数 - 包括嵌套项目
- php - 如何获取非对象 CodeIgniter 3.1 的“id”属性?
- python - 当我尝试 docker-compose up 时无法执行脚本 docker-compose
- docker - 如何在 Docker Compose 中修复此无效类型错误?