首页 > 其他 > 详细

warning insecure world writable dir ruby mode 040777,gem insstal sass error failed to build gem native extension

时间:2019-05-22 11:04:40      阅读:387      评论:0      收藏:0      [点我收藏+]

 

//1.删除原gem源
gem sources --remove https://rubygems.org/

//2.添加国内镜像
gem source -a https://gems.ruby-china.com

//3.打印是否替换成功
gem sources -l

//4.更换成功后打印如下
*** CURRENT SOURCES ***
 https://gems.ruby-china.com

 

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: /var/lib/gems/2.5.0/gems/ffi-1.11.1/ext/ffi_c
/usr/bin/ruby2.5 -r ./siteconf20190522-24821-9c6o4.rb extconf.rb
mkmf.rb cant find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/ffi-1.11.1 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/ffi-1.11.1/gem_make.out

 

技术分享图片

这个烂方法不能用

sudo chmod 777 /Library/Ruby/Gems

sudo chmod go-w /usr/local/bin

来安装一个homebrew

https://docs.brew.sh/Homebrew-on-Linux

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

继续按照官方说的做,基本上都是环境的问题。

test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile

安装完毕测试一下

brew install hello

技术分享图片

 

安装了完整版居然好了。。。。好吧

sudo apt-get install ruby-full

 

如果没好,那就继续

brew install ruby

不知道homebrew的不要问我,因为我也不知道是什么鬼。应该和忍者影分身一种鬼东西。

安装完毕看一下版本号

技术分享图片

 

继续安装sass(我叫他洒洒水)

技术分享图片

安装成功,查看一下是否安装成功

landv@Desktop201712556489:~/node$ sass -v
bash: sass: 未找到命令
landv@Desktop201712556489:~/node$ 

悲惨呀,又是环境问题,明明已经安装成功了

 

换一条路

npm install -g sass

一样的问题,找不到命令

FUCK~~~~

难道只有Deepin是酱紫~~~

好吧曲线救国,直接吧npm下载到的node-sass加入环境变量

 

 

综上所述,那就是卸载ruby再进行安装配置,如果还不行那就再卸载一边。

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Library/Ruby/Gems/2.3.0/gems/fuzzy_match-2.1.0/.gitignore

报这个错误就执行

sudo gem install cocoapods-core

然后再安装sass

记住千万不要用deepin自带的ruby

重要的事情不怕多说

sudo apt-get install ruby-full

Linux用流了,要比Windows配置快。

Deepin Linux 绝逼是环境的问题,虽然它不背锅吧。

https://www.cnblogs.com/landv/p/10867433.html(深度Linux /etc/profile 环境变量生效问题)

 

warning insecure world writable dir ruby mode 040777,gem insstal sass error failed to build gem native extension

原文:https://www.cnblogs.com/landv/p/10904578.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!