Running Homebrew as root is extremely dangerous and no longer supported

Running Homebrew as root is extremely dangerous and no longer supported

在使用homebrew安装smartmontools,查看Mac磁盘信息,包括mac磁盘写入量、mac磁盘健康、磁盘启动次数等,遇到的问题及解决方案

使用brew install smartmontools 提示无权限

直接加上sudo再次安装

使用sudo brew install smartmontools 遇到下述报错提示

Error: Running Homebrew as root is extremely dangerous and no longer supported.

As Homebrew does not drop privileges on installation you would be giving all

build scripts full access to your system.

意思是:

  • 以root身份运行Homebrew极其危险,不再受支持。
  • 由于HomeBrew不会在安装时删除权限,因此您将授予所有构建脚本对您的系统的完全访问权限

尝试去掉sudo再次安装 brew install smartmontools

注:当出现Updating Homebrew...control + C跳过更新brew

还不行,执行下面的命令:

复制代码
sudo chown -R `whoami` /usr/local/Homebrew/
sudo chown -R $(whoami) $(brew --prefix)/*
sudo mkdir /usr/local/Frameworks
sudo chown -R `whoami` /usr/local/Frameworks/
brew install smartmontools

下面是安装的过程截图

查看磁盘所有信息

shell 复制代码
smartctl -a disk0
相关推荐
Digitally4 小时前
解决“Move to iOS 卡在准备中”的 9 种有效方法
macos·ios·cocoa
影魅周影7 小时前
解决mac端pycharm执行allure命令报错:returned non-zero exit status 127
ide·macos·pycharm
2501_9275410911 小时前
CameraBag Mac英文 照片视频滤镜编辑工具
macos
uiop_uiop_uiop14 小时前
iOS arm64e hook MGCopyAnswer got Crash or Only Partial results got hooked
macos·ios·cocoa
私人珍藏库17 小时前
[Mac] Unclutter 2.2.15 Mac上的文件暂存 智能剪贴板历史记录管理器工具
macos
哈茶真的c17 小时前
【Mac】开发环境使用/维护
macos
醇氧20 小时前
mac 安装 LibreOffice
macos
马拉萨的春天20 小时前
iOS中如果一个大图500M直接加载显示会崩溃,那么如何设置加载显示呢?
macos·ios·cocoa
AiXed1 天前
PC微信WDA算法
前端·javascript·macos
刘晓倩1 天前
Docker Desktop(Windows/Mac)零外网部署 Dify 极简指南
macos·docker·容器