> rbenv install 2.4.0 ruby-build: use openssl from homebrew Downloading
> ruby-2.4.0.tar.bz2...
> -> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.0.tar.bz2 Installing ruby-2.4.0... ruby-build: use readline from homebrew
>
> BUILD FAILED (OS X 10.12.6 using ruby-build 20170726)
>
> Inspect or clean up the working tree at
> /var/folders/9_/xjrq9lv11hl_82pmlzqh3h0m0000gn/T/ruby-build.20170728015414.21759
> Results logged to
> /var/folders/9_/xjrq9lv11hl_82pmlzqh3h0m0000gn/T/ruby-build.20170728015414.21759.log
>
> Last 10 log lines: Referenced from: /usr/local/bin/tar Expected
> in: /usr/lib/libSystem.B.dylib
>
> dyld: Symbol not found: _utimensat Referenced from:
> /usr/local/bin/tar Expected in: /usr/lib/libSystem.B.dylib
>
> /usr/local/bin/ruby-build: line 344: 21953 Abort trap: 6 tar
> $tar_args "$package_filename"
> /var/folders/9_/xjrq9lv11hl_82pmlzqh3h0m0000gn/T/ruby-build.20170728015414.21759/ruby-2.4.0
> /var/folders/9_/xjrq9lv11hl_82pmlzqh3h0m0000gn/T/ruby-build.20170728015414.21759
> ~/Documents/Github /usr/local/bin/ruby-build: line 563: ./configure:
> No such file or directory
> / var / folders / 9_ / xjrq9lv11hl_82pmlzqh3h0m0000gn / T / ruby-build .20170728015414.2175 9.log 的内容
dyld:懒惰符号绑定失败:未找到符号:_utimensat
引用自:/ usr / local / bin / tar预期: /usr/lib/libSystem.B.dylibdyld:未找到符号:_utimensat参考自: / usr / local / bin / tar预期在:/usr/lib/libSystem.B.dylib
/ usr / local / bin / ruby-build:line 344:21953 Abort trap:6 tar $ tar_args“$ package_filename” /var/folders/9_/xjrq9lv11hl_82pmlzqh3h0m0000gn/T/ruby-build.20170728015414.21759/ruby-2.4.0 /var/folders/9_/xjrq9lv11hl_82pmlzqh3h0m0000gn/T/ruby-build.20170728015414.21759 〜/ Documents / Github / usr / local / bin / ruby-build:第563行:./ configure: 没有这样的文件或目录
答案 0 :(得分:1)
brew uninstall tar
rbenv install ruby 2.4.0
现在它可以工作了,所以看起来gnu-tar目前在Mac OS 10.12.16上运行得不好,必须回归本地macos tar
感谢@LucasCosta
答案 1 :(得分:0)
xcode-select --install
修复了MacOS Sierra上类似的ruby 2.4.2安装问题,在没有XCode Developer Tools的情况下安装XCode 9时会发生。