Homebrew-core: brew fails to install sass

Created on 30 May 2018  路  6Comments  路  Source: Homebrew/homebrew-core

  • [x] 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
  • [ ] have a problem with brew install (or upgrade, reinstall) a single, official formula (not cask)? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/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.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • [ ] if brew gist-logs didn't work: 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)
    Installing sass
  • What happened (include command output)
> $ brew install sass/sass/sass                                                                                                                                                                                                                                                                                                                 ==> Installing sass from sass/sass
==> Downloading https://github.com/sass/dart-sass/archive/1.4.0.tar.gz
Already downloaded: /Users/abrahma/Library/Caches/Homebrew/sass-1.4.0.tar.gz
Error: undefined method `opt_bin' for #<SoftwareSpec:0x007fe5170b7f80>
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Taps/sass/homebrew-sass/sass.rb:13:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:140:in `block (2 levels) in install'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1108:in `block in brew'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1942:in `block (2 levels) in stage'
/usr/local/Homebrew/Library/Homebrew/utils.rb:556:in `with_env'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1941:in `block in stage'
/usr/local/Homebrew/Library/Homebrew/resource.rb:119:in `block in unpack'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:13:in `block in mktemp'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:73:in `block in run'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:73:in `chdir'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:73:in `run'
/usr/local/Homebrew/Library/Homebrew/extend/fileutils.rb:12:in `mktemp'
/usr/local/Homebrew/Library/Homebrew/resource.rb:114:in `unpack'
/usr/local/Homebrew/Library/Homebrew/resource.rb:92:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1919:in `stage'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1103:in `brew'
/usr/local/Homebrew/Library/Homebrew/build.rb:111:in `block in install'
/usr/local/Homebrew/Library/Homebrew/utils.rb:556:in `with_env'
/usr/local/Homebrew/Library/Homebrew/build.rb:108:in `install'
/usr/local/Homebrew/Library/Homebrew/build.rb:189:in `<main>'
  • What you expected to happen
    Sass to be installed

  • Step-by-step reproduction instructions (by running brew install commands)
    brew install sass/sass/sass

  • Other diagnostics:

Output of brew gist-logs: https://gist.github.com/agam/7f4b0fe4285e3359302b8a316c90d67d

> $ brew doctor
Your system is ready to brew.
> $ brew config                                                                                                                                                                                                                                                                                                                                 HOMEBREW_VERSION: 1.6.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: e4c02fafdaef5676cf40dd6d16e74976cf54b265
Last commit: 5 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b1814bda721b02d0d196065cd79184afb47f9410
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.15.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_161
macOS: 10.13.3-x86_64
CLT: 9.3.0.0.1.1521514116
Xcode: N/A
XQuartz: N/A
outdated

Most helpful comment

agam's solution also worked for me :)
brew uninstall dart
brew install --devel dart
brew install sass/sass/sass

All 6 comments

Works for me, I'm afraid. (And then breaks later due to https://github.com/sass/homebrew-sass/issues/5.)

Are you sure you don't have a locally-modified sass.rb formula file? It's a bit of a surprise that the not-defined error is reported against a SoftwareSpec in your error message. This is line 13 of sass.rb:

    dart = Formula["dart-lang/dart/dart"].opt_bin

And normally, Formula[...] returns a Formula instance, not a SoftwareSpec, and opt_bin is definitely defined on Formula.

(BTW, sass/sass/sass isn't part of homebrew-core; it's part of the third-party tap at https://github.com/sass/homebrew-sass, and should probably be reported there instead.)

The issue is sass/sass/sass requires Dart SDK 1.25 or greater. The default Dart Homebrew formula is v1.24.3. You should be able to fix your issue by installing the development version of Dart: brew install --devel dart.

 depends_on "dart-lang/dart/dart" => [:build, "devel"]

is in the sass formula, but that isn't actually a valid dependency. There is no way to explicitly depend on a the devel version of another formula.

Excellent, running brew uninstall dart followed by brew install --devel dart, and _then_ brew install sass/sass/sass worked!

agam's solution also worked for me :)
brew uninstall dart
brew install --devel dart
brew install sass/sass/sass

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tejasmanohar picture tejasmanohar  路  3Comments

gregvirgin picture gregvirgin  路  3Comments

sstadick picture sstadick  路  4Comments

ghostbar picture ghostbar  路  4Comments

kiendang picture kiendang  路  3Comments