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
相关推荐
CyL_Cly13 小时前
localsend安卓手机下载 支持win/mac/ubuntu
android·macos·智能手机
A懿轩A14 小时前
Thaw:让 macOS 菜单栏重获新生的免费全能管理工具,适配 macOS Tache 26.4.1 系统,Ice平替活跃版,解决 Ice 常见报错问题
macos
无效的名字18 小时前
mac下安装openclaw
macos
00后程序员张18 小时前
完整指南 iOS App上架到App Store的步骤详解
macos·ios·小程序·uni-app·objective-c·cocoa·iphone
开开心心loky19 小时前
[OC 底层] (二)类与对象底层原理
macos·ios·objective-c·cocoa
谢斯1 天前
[esp-idf]macos 环境安装 v6.0
macos
idolao2 天前
ANSYS 2024安装教程 Windows版:License Manager配置+环境变量+Fluent汉化指南
macos
Digitally2 天前
4 种方法将 Mac 联系人同步到 iPhone
macos·cocoa·iphone
黄毛火烧雪下2 天前
在 macOS 里配置环境变量
macos
万粉变现经纪人2 天前
如何解决 pip install bitsandbytes 报错 仅支持 Linux+glibc(macOS/Windows 失败)问题
linux·运维·windows·python·scrapy·macos·pip