I want to install sass in my Ubuntu Linux, I'm trying to install it using ruby, but then I got this output
我想在我的Ubuntu Linux中安装sass,我正尝试使用Ruby安装它,但我得到了以下输出
haphoera@Xubuntu:~$ gem install sass-embedded
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/3.0.0 directory.
I've tried installing sass using npm or node.js but it gave me the same output, I already closed the terminal I've used for that, so I can't really show what's the error I'm receiving when installing sass using npm. But it's kind of the same with gem, it's about the permissions. I've watched videos on youtube to solve the npm problem but all of them are not working.
我尝试过使用npm或node.js安装sass,但它给了我相同的输出,我已经关闭了用于此操作的终端,所以我无法真正显示使用npm安装sass时收到的错误。但这与GEM差不多,这是关于权限的。我在YouTube上看过解决NPM问题的视频,但它们都不起作用。
So I'm trying to use ruby instead (if it's better, because I read online that installing sass using npm is slower).
所以我试着改用Ruby(如果这样更好的话,因为我在网上读到使用NPM安装sass比较慢)。
How can I change the permission or fix this? Can't find anything useful on the internet.
如何更改权限或修复此问题?在网上找不到任何有用的东西。
更多回答
Use some manager of Ruby versions like asdf, rbenv, rvm, chruby instead of using system Ruby. Or use docker
使用一些Ruby版本的管理器,如asdf,rbenv,rvm,chruby,而不是使用系统Ruby。使用Docker
优秀答案推荐
我是一名优秀的程序员,十分优秀!