如何在Ubuntu下安装colorls

我想安装 colorls。 它看起来很方便:

我试着按照安装说明进行操作。 但是,它们似乎不是为 Ubuntu 制作的。

首先,因为 gem 不存在,我必须运行 sudo apt install ruby-rubygems。

现在,当我尝试安装它时遇到此错误:

$ gem install colorls
Fetching colorls-1.4.6.gem
...
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/3.0.0 directory.

尝试使用 --user-install 

$ gem install --user-install colorls
WARNING:  You don't have /home/flimm/.local/share/gem/ruby/3.0.0/bin in your PATH,
      gem executables will not run.
Successfully installed unicode-display_width-2.4.2
Successfully installed rainbow-3.1.1
Successfully installed manpages-0.6.1
Successfully installed filesize-0.2.0
Building native extensions. This could take a while...
ERROR:  Error installing colorls:
    ERROR: Failed to build gem native extension.

    current directory: /home/flimm/.local/share/gem/ruby/3.0.0/gems/clocale-0.0.4/ext/clocale
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230407-19626-voy41j.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

extconf failed, exit code 1

Gem files will remain installed in /home/flimm/.local/share/gem/ruby/3.0.0/gems/clocale-0.0.4 for inspection.
Results logged to /home/flimm/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值