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
相关推荐
cmdyu_2 小时前
修复mac系统下node22安装模块报fatal error: ‘memory‘ file not found错误的问题
macos·npm·node.js
白玉cfc7 小时前
【iOS】UICollectionView
macos·ios·cocoa
fukai77227 小时前
BetterDisplay Pro for Mac显示器增强工具
macos·计算机外设
ajassi20009 小时前
开源 Objective-C IOS 应用开发(一)macOS 的使用
macos·ios
MonkeyKing_sunyuhua9 小时前
mac怎么卸载office Powerpoint
macos·powerpoint
lichong95110 小时前
【macOS 版】Android studio jdk 1.8 gradle 一键打包成 release 包的脚本
android·java·前端·macos·android studio·大前端·大前端++
fukai772211 小时前
优雅与极简:将你的屏幕变成复古翻页钟——Fliqlo for Mac 完全指南
macos
BianHuanShiZhe1 天前
ios 26的tabbar 背景透明
macos·objective-c·cocoa
ai_xiaogui1 天前
AIStarter跨平台完工:Win/Mac/Linux一键部署Stable Diffusion
linux·macos·stable diffusion·aistarter·kritaai·跨平台部署
Macbethad1 天前
Typora 精通指南:掌握高效 Markdown 写作的艺术
前端·macos·前端框架