gpt4 book ai didi

macos - 为什么 Sass 会倒在 HighSierra 上?

转载 作者:行者123 更新时间:2023-12-01 01:48:21 26 4
gpt4 key购买 nike

将 macOS 更新为 HighSierra,尝试启动 scss watcher 并得到这个:

-bash: /usr/local/bin/sass: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory



当我尝试重新安装时

sudo gem install sass



我看到这个错误:

Building native extensions. This could take a while... ERROR: Error installing sass: ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.18/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20171012-1933-1pk37g.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.18 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-17/2.3.0/ffi-1.9.18/gem_make.out



我该如何解决?

最佳答案

我从 iamcubcs ( https://github.com/oklai/koala/issues/679 ) 遵循了这个解决方案

  • 打开终端
  • 安装 Homebrew:ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • 不要关闭终端,打开 Mac Appstore 并检查更新,安装所有 XCode 命令行工具更新,或者在我的情况下,XCode 命令行工具在第 2 步之后立即通过终端开始自动安装。
  • 返回终端
  • 安装 Ruby:
brew install rbenv ruby-build
  • 安装 SASS gem:sudo gem install -n /usr/local/bin sass

  • 这对我有用

    关于macos - 为什么 Sass 会倒在 HighSierra 上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46719549/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com