Closed bdesham closed 5 years ago
Error: Permission denied @ unlink_internal - /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
This would also most likely cause brew upgrade
to fail if ghostscript
were upgraded, FYI.
The problem here is that
brew cleanup
ran after the first installation ofbrew upgrade
rather than waiting for that command to install everything it needed to.
This is intentional and although the reasoning may appear weird the first time because it's usually doing a per-package cleanup in this situation.
I understand why
brew cleanup
is being run automatically now, but I also think that if this command fails for any reason, Homebrew should probably not attempt to run it again automatically until it has been successful again.
I don't agree as this would block brew cleanup
from every being run again in your situation which is not desirable (without the environment variable declaring it so).
While this seems to be an issue with your permissions/configuration on your personal machine brew cleanup
could perhaps better handle permission errors it encounters.
Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I ran
brew upgrade
to upgrade my packages.What happened (include command output)
brew cleanup
is run automatically now (see #4760). In this case, it was run after the very first package was installed, despite the fact that there were 18 more packages that still needed to be upgraded. The cleanup command itself issued a ton of warnings likeDue to an unrelated problem with one of my packages the
brew cleanup
command aborted and I was left with just one package having been upgraded. I tried runningbrew upgrade
again and this time it installed a different package but still ranbrew cleanup
, with the same result as before.I searched the issue tracker, found issue #4760 and the environment variable mentioned there, and tried running
This allowed the upgrade to complete successfully.
Output from two runs of
brew cleanup
What you expected to happen
I didn’t really expect
brew cleanup
to run by itself, but I suppose that’s a separate issue. The problem here is thatbrew cleanup
ran after the first installation ofbrew upgrade
rather than waiting for that command to install everything it needed to.I understand why
brew cleanup
is being run automatically now, but I also think that if this command fails for any reason, Homebrew should probably not attempt to run it again automatically until it has been successful again.Step-by-step reproduction instructions (by running
brew
commands)brew cleanup
in the past 30 daysbrew upgrade
Other information
brew config
outputbrew doctor
output