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 -> Error: mpfr@2: undefined method `undent' #4494

Closed
3 of 5 tasks
publicarray opened this issue Jul 17, 2018 · 20 comments
Closed
3 of 5 tasks

brew uninstall -> Error: mpfr@2: undefined method `undent' #4494

publicarray opened this issue Jul 17, 2018 · 20 comments
Assignees

Comments

@publicarray
Copy link

publicarray commented Jul 17, 2018

Please note 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.

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a 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 a brew 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.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
    (I've tried linking and unlinking mpfr@2 and mpfr but I till get the error)
  • ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
    I'm trying to remove a package
  • What happened (include command output)
    brew uninstall, reinstall and doctor exit with
    Error: mpfr@2: undefined method `undent' for #<String:0x0000000101161258>
  • What you expected to happen
    The commands to succeed
  • Step-by-step reproduction instructions (by running brew commands)
$ brew remove mpfr@2
Error: mpfr@2: undefined method `undent' for #<String:0x00000001025cc3f0>
$ brew config
HOMEBREW_VERSION: 1.7.0-13-g63c5bd9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 63c5bd96a071074edc9c0e753e871faf1e8c8d1d
Last commit: 10 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 6fb6e40e54fb48e14a4b98b32f805a2d3a4fd298
Core tap last commit: 74 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_VISUAL: ne
CPU: octa-core 64-bit ivybridge
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 9.1 build 902
Git: 2.18.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_162
macOS: 10.13.6-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: 9.4.1
XQuartz: 2.7.11 => /opt/X11

$ brew doctor
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  mpfr@2
Error: mpfr@2: undefined method `undent' for #<String:0x0000000101dba338>
@MikeMcQuaid
Copy link
Member

Please run brew remove mpfr@2 --debug, thanks!

@publicarray
Copy link
Author

publicarray commented Jul 17, 2018

Hi, thanks for the quick response.

brew remove mpfr@2 --debug output (click on me)
**removed**

@vitorgalvao
Copy link
Member

We’re also getting reports of this issue on the cask taps.

@reitermarkus
Copy link
Member

This was caused by #4392.

@MikeMcQuaid
Copy link
Member

@vitorgalvao Of a failure to remove formulae?

@reitermarkus
Copy link
Member

Of undent not existing.

@ghost ghost assigned MikeMcQuaid Jul 17, 2018
@ghost ghost added the in progress Maintainers are working on this label Jul 17, 2018
@ghost ghost removed the in progress Maintainers are working on this label Jul 17, 2018
@onaforeignshore
Copy link

I did a search of Homebrew, Caskroom, and Cellar and found multiple occurrences of <<-EOS.undent. Doing a global search for .undent and removing it fixed the error for me.

@toejough
Copy link

clicked through to the merged PR (#4502) and saw a statement that the method was deprecated. The cask that's failing for me is kind of old - is deleting the directory (/usr/local/Caskroom/android-sdk for me) the recommended way for people to deal with this error now?

@MikeMcQuaid
Copy link
Member

The error with Casks needs to have a separate issue. Feel free to open one @toejough or @onaforeignshore; no manual deletion should be required.

@toejough
Copy link

wow, solid 👍 on the fast response. Unfortunately, I'm churning through a bunch of installation updates right now and didn't expect to hear back from anyone for a while, so I already nuked the directory - I can make an issue, but I won't be able to provide the standard debug data the issue template asks for.

@toejough
Copy link

wait! I've got other old casks I just hadn't run into. I'll file new issue :-)

@toejough
Copy link

oh, well hold on - Homebrew/homebrew-cask#49716 (comment) was a Casks issue, and was closed citing this one. Should that one be re-opened?

@yegor256
Copy link

@publicarray @toejough what's the deal with this issue? I just upgraded Homebrew and it doesn't work anymore.

@MikeMcQuaid
Copy link
Member

@yegor256 Please be more specific or just subscribe to the issue, please.

@kelleyrw
Copy link

I'm seeing same issue after a brew update:

[rwkelley@vector tools]$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/ec545d45d4512ace3570782283df4ecda6bb0044/Formula/python3.rb ######################################################################## 100.0% Error: python3: undefined method undent' for #String:0x0000000102127890`

@MikeMcQuaid
Copy link
Member

@kelleyrw That's because you're trying to install an old, unsupported Git revision of Python 3. We will not and cannot fix that.

@kelleyrw
Copy link

@MikeMcQuaid The error message doesn't look like an a python issue per se. It looks like a ruby issue and the same error is seen above by @reitermarkus.

I Understand that this is not an appropriate comment here on this thread but just an observation: Why no support older versions of python? I'm not seeing a python@3.5 for example. Doesn't it seem a bit risky to only support the latest version? Most production systems may be several version behind.

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid The error message doesn't look like an a python issue per se. It looks like a ruby issue and the same error is seen above by @reitermarkus.

@kelleyrw It is an issue with the fact you are trying to install a random revision of a formula from the Git history. This is not something we can fix or will fix. It's the same error because it's the same underlying cause: the method used in that formula was deprecated, disabled and now removed.

I Understand that this is not an appropriate comment here on this thread but just an observation: Why no support older versions of python? I'm not seeing a python@3.5 for example. Doesn't it seem a bit risky to only support the latest version? Most production systems may be several version behind.

Please read https://docs.brew.sh/Versions.

@kelleyrw
Copy link

Thank you for pointing this out.

@yzlnew
Copy link

yzlnew commented Aug 7, 2018

For me, it's caused by mactex-no-ghostscript in .metadata.
Here's how to handle this issue in detail.

cd /usr/local/Caskroom     # or Cellar Homebrew
grep "<<-EOS.undent" -R .  # search the `undent` method
vim PATH_FROM_ABOVE        # locate the method and comment relative lines

@onaforeignshore thx.

@Homebrew Homebrew locked as resolved and limited conversation to collaborators Aug 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants