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
相关推荐
TO_ZRG41 分钟前
iOS 符号表文件概要
macos·ios·cocoa
默默在路上1 小时前
M芯片使用VMware Fusion安装CentOS Stream 9教程
linux·macos·centos
TheNextByte11 小时前
如何在Mac上收发Android信息 [2026 指南]
android·macos
耘田1 小时前
 macOS Launch Agent 定时任务实践指南
java·开发语言·macos
不爱吃糖的程序媛1 小时前
macOS 系统本地安装 openJiuwen 完整指南
macos
William.csj1 小时前
Mac——一款支持跨平台的与服务器之间的远程传输工具 FileZilla
macos·filezilla
Nightmare00419 小时前
Mac打开终端
macos
亚里随笔1 天前
vscode mac常用技巧—快捷键
ide·vscode·macos
Nightmare0041 天前
Mac 安装brew
大数据·macos
xiliuhu1 天前
Mac下使用conda安装PyTorch环境
pytorch·python·macos·conda