Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.41k stars 9.74k forks source link

Cannot install maven (NoMethodError) #7601

Closed OrigamiDream closed 4 years ago

OrigamiDream commented 4 years ago

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.

What you were trying to do (and why)

I tried install maven via homebrew.

homebrew keeps throwing error.

I replaced user name of my computer to $USER bcuz it is my personal information.

Command output
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
qownnotes

==> Downloading https://www.apache.org/dyn/closer.lua?path=maven/maven-3/3.6.3/b
Already downloaded: /Users/$USER/Library/Caches/Homebrew/downloads/0e3db71029ad3d74e8d92f48af665453e19b0481a616826aa0686d64a5cc865f--apache-maven-3.6.3-bin.tar.gz
Error: An exception occurred within a child process:
  NoMethodError: undefined method `path' for nil:NilClass
Did you mean?  paths
  

What you expected to happen

It should install maven into my computer.

Step-by-step reproduction instructions (by running brew commands)

brew install maven

Output of brew config and brew doctor commands

brew config

HOMEBREW_VERSION: 2.2.17
ORIGIN: https://github.com/Homebrew/brew
HEAD: ca5eac845dc11e991d7d8f8c85aebb82dd454f37
Last commit: 18 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3dad3a4fc5bc6521fbd97304b47cff6e4022decd
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_MAKE_JOBS: 16
CPU: 16-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.24.2 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 14.0.1, 1.8.0_252, 1.8.0_232
macOS: 10.15.4-x86_64
CLT: 11.0.33.17
Xcode: 11.4.1

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: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /opt/local/bin/icu-config
  /opt/local/bin/krb5-config
  /opt/local/bin/python2.7-config
  /opt/local/bin/xml2-config
  /opt/local/bin/curl-config
  /opt/local/bin/ncursesw6-config
  /opt/local/bin/pcre2-config
  /opt/local/bin/pcre-config
  /opt/local/bin/sdl-config
  /opt/local/bin/ncurses6-config
MikeMcQuaid commented 4 years ago

I cannot reproduce this. Please provide the output of brew install --debug maven

OrigamiDream commented 4 years ago

@MikeMcQuaid

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> New Formulae
clip                       field3d                    pfetch
==> Updated Formulae
batik           evince          ngt             rom-tools       skopeo
duo_unix        goreleaser      nushell         sane-backends   vulkan-headers
==> Deleted Formulae
gnome-builder

/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/maven.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openjdk.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/autoconf.rb
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.2.17\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.4\)\ curl/7.64.1 --retry 3 --silent --location https://www.apache.org/dyn/closer.lua\?path=maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz\&asjson=1
==> Downloading https://www.apache.org/dyn/closer.lua?path=maven/maven-3/3.6.3/b
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.2.17\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.4\)\ curl/7.64.1 --retry 3 --location --silent --head --request GET http://apache.tt.co.kr/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
Already downloaded: /Users/seondongyoung/Library/Caches/Homebrew/downloads/0e3db71029ad3d74e8d92f48af665453e19b0481a616826aa0686d64a5cc865f--apache-maven-3.6.3-bin.tar.gz
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/mvnvm.rb
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FromPathLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/maven.rb
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openjdk.rb
/usr/local/Homebrew/Library/Homebrew/build.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/autoconf.rb
Error: An exception occurred within a child process:
  NoMethodError: undefined method `path' for nil:NilClass
Did you mean?  paths
/usr/local/Homebrew/Library/Homebrew/extend/os/mac/extend/ENV/super.rb:112:in `setup_build_environment'
/usr/local/Homebrew/Library/Homebrew/build.rb:88:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:198:in `
'
MikeMcQuaid commented 4 years ago

@OrigamiDream The error message should be improved but I'm pretty sure your outdated CLT is causing this, please update it and try again.

Bo98 commented 4 years ago

Something's funky about your CLT install where it can't find SDKs.

What does ls -l /Library/Developer/CommandLineTools/SDKs return?

OrigamiDream commented 4 years ago

@MikeMcQuaid @Bo98 Yeah, exactly. I'm using 10.13 SDK on Catalina due to it is required to me.

I should install it manually. Thank you!