Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew uninstall --cask mactex fails #171397

Closed
6 tasks done
mwparis opened this issue Apr 15, 2024 · 2 comments
Closed
6 tasks done

brew uninstall --cask mactex fails #171397

mwparis opened this issue Apr 15, 2024 · 2 comments

Comments

@mwparis
Copy link

mwparis commented Apr 15, 2024

Verification

Description of issue

Unable to uninstall mactex with any combination of commands attempted including the "Command that failed" combined with --force and having run brew update-reset && brew and brew doctor. I've searched for related, recent bugs but the closest is from 2017 with brew cask syntax.

When asked for the password, it appears to be accepted once but not the second time:

==> Uninstalling Cask mactex
==> Uninstalling packages with sudo; the password may be necessary:
/usr/bin/env /usr/sbin/pkgutil --files org.tug.mactex.gui2023
org.tug.mactex.gui2023
/usr/bin/env /usr/sbin/pkgutil --pkg-info-plist org.tug.mactex.gui2023
==> Deleting pkg files
/usr/bin/sudo -u root -E -- /usr/bin/xargs -0 -- /bin/rm --
==> Deleting pkg symlinks and special files
/usr/bin/sudo -u root -E -- /usr/bin/xargs -0 -- /bin/rm --
mparis is not in the sudoers file.
This incident has been reported to the administrator.
Error: Failure while executing; `/usr/bin/sudo -u root -E -- /usr/bin/xargs -0 -- /bin/rm --` exited with 1. Here's the output:
mparis is not in the sudoers file.
This incident has been reported to the administrator.

Command that failed

brew uninstall --cask --verbose --debug mactex

Output of command with --verbose --debug

/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromPathLoader): loading /opt/homebrew/Caskroom/mactex/.metadata/2023.0314/20230330205424.607/Casks/mactex.json
/opt/homebrew/Library/Homebrew/brew.rb (Formulary::FromAPILoader): loading homebrew/core/pstoedit
...
==> Uninstalling Cask mactex
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromPathLoader): loading /opt/homebrew/Caskroom/mactex/.metadata/2023.0314/20230330205424.607/Casks/mactex.json
==> Uninstalling artifacts
==> 3 artifacts defined
#<Cask::ArtifactSet: {#<Cask::Artifact::Uninstall:0x0000000109f74f18 @cask=#<Cask mactex>, @dsl_args=[{:pkgutil=>["org.tug.mactex.gui2023", "org.tug.mactex.texlive2023"], :delete=>["/usr/local/texlive/2023", "/Applications/TeX", "/Library/TeX", "/etc/paths.d/TeX", "/etc/manpaths.d/TeX"]}], @directives={:pkgutil=>["org.tug.mactex.gui2023", "org.tug.mactex.texlive2023"], :delete=>["/usr/local/texlive/2023", "/Applications/TeX", "/Library/TeX", "/etc/paths.d/TeX", "/etc/manpaths.d/TeX"], :signal=>[]}>, #<Cask::Artifact::Pkg:0x0000000109f7f738 @cask=#<Cask mactex>, @dsl_args=["mactex-20230314.pkg", {:choices=>[{:choiceIdentifier=>"org.tug.mactex.ghostscript10.00", :choiceAttribute=>"selected", :attributeSetting=>0}, {:choiceIdentifier=>"org.tug.mactex.ghostscript10.00-libgs", :choiceAttribute=>"selected", :attributeSetting=>0}, {:choiceIdentifier=>"org.tug.mactex.gui2023", :choiceAttribute=>"selected", :attributeSetting=>1}, {:choiceIdentifier=>"org.tug.mactex.texlive2023", :choiceAttribute=>"selected", :attributeSetting=>1}]}], @path=#<Pathname:/opt/homebrew/Caskroom/mactex/2023.0314/mactex-20230314.pkg>, @stanza_options={:choices=>[{:choiceIdentifier=>"org.tug.mactex.ghostscript10.00", :choiceAttribute=>"selected", :attributeSetting=>0}, {:choiceIdentifier=>"org.tug.mactex.ghostscript10.00-libgs", :choiceAttribute=>"selected", :attributeSetting=>0}, {:choiceIdentifier=>"org.tug.mactex.gui2023", :choiceAttribute=>"selected", :attributeSetting=>1}, {:choiceIdentifier=>"org.tug.mactex.texlive2023", :choiceAttribute=>"selected", :attributeSetting=>1}]}>, #<Cask::Artifact::Zap:0x0000000109f7ca38 @cask=#<Cask mactex>, @dsl_args=[{:trash=>["/usr/local/texlive/texmf-local", "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/texshop.sfl*", "~/Library/Application Support/TeXShop", "~/Library/Caches/com.apple.helpd/Generated/TeXShop Help*", "~/Library/Caches/TeXShop", "~/Library/Preferences/TeXShop.plist", "~/Library/TeXShop", "~/Library/Application Support/BibDesk", "~/Library/Caches/com.apple.helpd/Generated/edu.ucsd.cs.mmccrack.bibdesk.help*", "~/Library/Caches/edu.ucsd.cs.mmccrack.bibdesk", "~/Library/Cookies/edu.ucsd.cs.mmccrack.bibdesk.binarycookies", "~/Library/Preferences/edu.ucsd.cs.mmccrack.bibdesk.plist", "~/Library/Caches/fr.chachatelier.pierre.LaTeXiT", "~/Library/Cookies/fr.chachatelier.pierre.LaTeXiT.binarycookies", "~/Library/Preferences/fr.chachatelier.pierre.LaTeXiT.plist", "~/Library/Application Support/TeX Live Utility", "~/Library/Caches/com.apple.helpd/Generated/TeX Live Utility Help*"], :rmdir=>"/usr/local/texlive"}], @directives={:trash=>["/usr/local/texlive/texmf-local", "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/texshop.sfl*", "~/Library/Application Support/TeXShop", "~/Library/Caches/com.apple.helpd/Generated/TeXShop Help*", "~/Library/Caches/TeXShop", "~/Library/Preferences/TeXShop.plist", "~/Library/TeXShop", "~/Library/Application Support/BibDesk", "~/Library/Caches/com.apple.helpd/Generated/edu.ucsd.cs.mmccrack.bibdesk.help*", "~/Library/Caches/edu.ucsd.cs.mmccrack.bibdesk", "~/Library/Cookies/edu.ucsd.cs.mmccrack.bibdesk.binarycookies", "~/Library/Preferences/edu.ucsd.cs.mmccrack.bibdesk.plist", "~/Library/Caches/fr.chachatelier.pierre.LaTeXiT", "~/Library/Cookies/fr.chachatelier.pierre.LaTeXiT.binarycookies", "~/Library/Preferences/fr.chachatelier.pierre.LaTeXiT.plist", "~/Library/Application Support/TeX Live Utility", "~/Library/Caches/com.apple.helpd/Generated/TeX Live Utility Help*"], :rmdir=>"/usr/local/texlive", :signal=>[]}>}>
==> Uninstalling artifact of class Cask::Artifact::Uninstall
/usr/bin/env /usr/sbin/pkgutil --pkgs=org.tug.mactex.gui2023
==> Uninstalling Cask mactex
==> Uninstalling packages with sudo; the password may be necessary:
/usr/bin/env /usr/sbin/pkgutil --files org.tug.mactex.gui2023
org.tug.mactex.gui2023
/usr/bin/env /usr/sbin/pkgutil --pkg-info-plist org.tug.mactex.gui2023
==> Deleting pkg files
/usr/bin/sudo -u root -E -- /usr/bin/xargs -0 -- /bin/rm --
==> Deleting pkg symlinks and special files
/usr/bin/sudo -u root -E -- /usr/bin/xargs -0 -- /bin/rm --
mparis is not in the sudoers file.
This incident has been reported to the administrator.
Error: Failure while executing; `/usr/bin/sudo -u root -E -- /usr/bin/xargs -0 -- /bin/rm --` exited with 1. Here's the output:
mparis is not in the sudoers file.
This incident has been reported to the administrator.
/opt/homebrew/Library/Homebrew/system_command.rb:344:in `assert_success!'
/opt/homebrew/Library/Homebrew/system_command.rb:67:in `run!'
/opt/homebrew/Library/Homebrew/system_command.rb:32:in `run'
/opt/homebrew/Library/Homebrew/system_command.rb:36:in `run!'
/opt/homebrew/Library/Homebrew/cask/pkg.rb:42:in `uninstall'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_uninstall.rb:395:in `block (2 levels) in uninstall_pkgutil'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_uninstall.rb:393:in `each'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_uninstall.rb:393:in `block in uninstall_pkgutil'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_uninstall.rb:392:in `each'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_uninstall.rb:392:in `uninstall_pkgutil'
/opt/homebrew/Library/Homebrew/cask/artifact/abstract_uninstall.rb:79:in `dispatch_uninstall_directive'
/opt/homebrew/Library/Homebrew/cask/artifact/uninstall.rb:24:in `block in uninstall_phase'
/opt/homebrew/Library/Homebrew/cask/artifact/uninstall.rb:23:in `each'
/opt/homebrew/Library/Homebrew/cask/artifact/uninstall.rb:23:in `uninstall_phase'
/opt/homebrew/Library/Homebrew/cask/installer.rb:477:in `block in uninstall_artifacts'
/opt/homebrew/Library/Homebrew/cask/artifact_set.rb:14:in `each'
/opt/homebrew/Library/Homebrew/cask/artifact_set.rb:14:in `each'
/opt/homebrew/Library/Homebrew/cask/installer.rb:474:in `uninstall_artifacts'
/opt/homebrew/Library/Homebrew/cask/installer.rb:412:in `uninstall'
/opt/homebrew/Library/Homebrew/cask/uninstall.rb:15:in `block in uninstall_casks'
/opt/homebrew/Library/Homebrew/cask/uninstall.rb:10:in `each'
/opt/homebrew/Library/Homebrew/cask/uninstall.rb:10:in `uninstall_casks'
/opt/homebrew/Library/Homebrew/cmd/uninstall.rb:73:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:89:in `<main>'

Output of brew doctor and brew config

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  aquaterm
  atom

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  llvm@11
  [email protected]

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libprimesieve.9.5.0.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/primesieve.h
  /usr/local/include/primesieve/iterator.h

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/primesieve.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libprimesieve.a

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  certifi

$ brew config
HOMEBREW_VERSION: 4.2.18
ORIGIN: https://github.com/Homebrew/brew
HEAD: 9edabf02ce29e54d0b717baa757cff38ad0c0e25
Last commit: 24 hours ago
Core tap JSON: 15 Apr 20:41 UTC
Core cask tap JSON: 15 Apr 20:41 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CURLRC: 1
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.wakkWhBOxG/org.xquartz:0
HOMEBREW_EDITOR: /usr/bin/vi
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.1.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 14.0.0 build 1400
Git: 2.44.0 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 12.7.4-arm64
CLT: 14.2.0.0.1.1668646533
Xcode: N/A
Rosetta 2: false

Output of brew tap

$ brew tap
cartr/qt4
fortran-lang/fortran
@daeho-ro
Copy link
Contributor

Are your account sudoer?

mparis is not in the sudoers file.
This incident has been reported to the administrator.

@mwparis
Copy link
Author

mwparis commented Apr 22, 2024

Thanks. I must have been entering the 'wrong' password when prompted from an account in 'sudoers'; trying again from that account resolved it.

@mwparis mwparis closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants