我正在尝试运行brew cleanup
,但遇到以下错误:
错误:无法清理旧桶!修复您的权限:
% brew cleanup
Removing: /usr/local/Cellar/ansible/6.6.0... (28,050 files, 364MB)
Warning: Directory not empty @ dir_s_rmdir - /usr/local/Cellar/ansible/6.6.0
==> This operation has freed approximately 364MB of disk space.
Error: Could not cleanup old kegs! Fix your permissions on:
/usr/local/Cellar/ansible/6.6.0
% echo $?
1
%
请指教。
要解决“修复您的权限”错误,必须使用
chown(8)
(更改文件所有者和组)以及sudo(8)
(以另一个用户身份执行命令),如下所示: