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
相关推荐
qq_251533593 小时前
使用 Python 提取 MAC 地址
网络·python·macos
24zhgjx-fuhao15 小时前
配置MAC地址安全
macos
Wcowin16 小时前
OneClip 开发经验分享:从零到一的 macOS 应用开发
经验分享·macos·策略模式
1024小神16 小时前
xcode多环境 Dev 、Debug 和 Release变量配置以及怎么切换不同环境
开发语言·macos·ios·swiftui·xcode·swift
2501_9159184117 小时前
iOS 应用如何防止破解?从逆向链路还原攻击者视角,构建完整的反破解工程实践体系
android·macos·ios·小程序·uni-app·cocoa·iphone
他们都不看好你,偏偏你最不争气17 小时前
【iOS】MVVM
macos·ios·objective-c·cocoa
2501_9159090618 小时前
没有 Mac 怎么上架 iOS 应用 跨平台团队的可行交付方案分析
android·macos·ios·小程序·uni-app·iphone·webview
AI云原生2 天前
openEuler软件生态体验——从桌面到服务器的全方位探索
运维·服务器·windows·macos·docker·云计算·腾讯云
KevinShi_BJ2 天前
MacOS 安装 Docker
macos
小a彤2 天前
Flutter 混合开发方案深度解析
flutter·macos·cocoa