我想安装 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