请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师,sass安装不上

nodejs、ruby、gem、webpack都安装了,用过好几种语句,sass还是装不上,提示如下

Tom@Tom-PC MINGW64 ~/Desktop
$ ssh root@101.132.140.8
root@101.132.140.8's password:
Last login: Mon Oct  9 22:19:32 2017 from 124.74.107.114

Welcome to Alibaba Cloud Elastic Compute Service !

-bash: unse: command not found
-bash: rt: command not found
[root@iZuf6c3lh54r8qj8l3o6zlZ ~]# cd /usr/local/
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# ruby -v
ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# gem -v
1.3.7
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# webpack -v
2.6.1
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sudo gem install sass@3.4.24
 ERROR:  Could not find a valid gem 'sass@3.4.24' (>= 0) in any repository
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#  sass -v
-bash: sass: command not found
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sudo su -c "gem install sass"
Building native extensions.  This could take a while...
ERROR:  Error installing sass:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.18 for in                                                                                                                                                                                                                                                                                           spection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.18/ext/ffi_c/gem_make.out
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sass -v
-bash: sass: command not found
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sudo gem install sass --no-user-install
Building native extensions.  This could take a while...
ERROR:  Error installing sass:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.18 for in                                                                                                                                                                                                                                                                                           spection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.18/ext/ffi_c/gem_make.out
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sass -v
-bash: sass: command not found
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sudo yum install rubygems
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Package rubygems-1.3.7-5.el6.noarch already installed and latest version
Nothing to do
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sass
-bash: sass: command not found
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sudo gem install sass
Building native extensions.  This could take a while...
ERROR:  Error installing sass:
        ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/ffi-1.9.18 for in                                                                                                                                                                                                                                                                                           spection.
Results logged to /usr/lib/ruby/gems/1.8/gems/ffi-1.9.18/ext/ffi_c/gem_make.out
[root@iZuf6c3lh54r8qj8l3o6zlZ local]# sass
-bash: sass: command not found
[root@iZuf6c3lh54r8qj8l3o6zlZ local]#


正在回答 回答被采纳积分+3

1回答

提问者 TheBayMax 2017-10-10 10:20:57

解决,用rvm安装了 ruby  再gem install sass  就安装好了

0 回复 有任何疑惑可以回复我~
  • Rosen #1
    收到!
    回复 有任何疑惑可以回复我~ 2017-10-10 20:00:08
  • 浣玉 #2
    怎么操作?求解
    回复 有任何疑惑可以回复我~ 2018-07-11 15:10:59
  • 浣玉 回复 Rosen #3
    老师,可以使用npm install -g sass安装吗?
    回复 有任何疑惑可以回复我~ 2018-07-11 15:11:23
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信