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
相关推荐
张飞签名上架21 小时前
深耕全球市场:App上架iOS与Google Play全流程指南
macos·ios·cocoa·ios上架·上架·谷歌上架
DisonTangor1 天前
Mac Studio配备1.5 TB显存——基于雷电5的远程直接内存访问技术
人工智能·macos·开源·aigc
天庭鸡腿哥1 天前
输入序列号,可激活正版软件!
microsoft·macos·visual studio·everything
FreeBuf_1 天前
朝鲜黑客组织“传染性面试“瞄准macOS:新型“DriverFixer“窃密工具浮出水面
macos·面试·职场和发展
Zfox_2 天前
无缝穿越系统边界:节点小宝4.0如何让我的Mac/iOS像访问本地盘一样操控Windows
windows·macos·ios·节点小宝
MicJordan2 天前
macos安装Claude提示command not found
macos
坠金2 天前
mac电脑网络卡顿解决方法
macos
写点啥呢2 天前
MacOS远程桌面报错0x207解决方法
macos
CrankZ2 天前
幕译 1.7--本地字幕生成与翻译--支持macOS,Windows
macos·whisper
ashcn20012 天前
autohotkey模拟mac中英文切换和ESC切成英文(适配vim)
macos·autohotkey