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
相关推荐
oil欧哟1 天前
Oil Studio 的产品思路与日常使用方式:在 Mac 上录口播演示,并接入 AI Agent 精剪与自动录屏
人工智能·macos
小毛球.2 天前
第 3 篇:IDEA 最新版下载与完整安装教程(Mac)
java·macos·intellij-idea·idea
CodeClimb4 天前
Mac 磁盘无法推出(DMG外接盘)排查处理教程
macos
Karl_fang5 天前
🥳 再也不用拿起手机抄验证码!我做了一个 Android → Mac 的「验证码接力」工具
前端·macos·ai编程
csdn_aspnet6 天前
macOS 10 、Docker 玩轉 MySQL
运维·mysql·macos·docker·容器·mac
秋雨梧桐叶落莳6 天前
【iOS】Block底层详解
macos·ios·cocoa
高调的涵涵8 天前
café 和 café 不是一个文件名
macos
独隅10 天前
WebStorm macOS 安装部署与高效调优完全指南
ide·macos·webstorm
独隅10 天前
WebStorm macOS 安装调优与实战效能全景
ide·macos·webstorm
2601_9679873711 天前
安装 Redis 或 Redis Stack
linux·windows·redis·macos·安装