colorls
colorls copied to clipboard
How to install colorls inside WSL?
setup:
- Ubuntu (app is displayed as Ubuntu (not Ubuntu 18.04 or Ubuntu 16.04. just Ubuntu)) inside Windows AppStore
- tried with "ruby" and "ruby-full" apt packages
- tried with and without "-- --use-system-libraries"
This is error I'm getting. Any ideas on how to fix? Thanks
➜ sudo gem install colorls -- --use-system-libraries Building native extensions with: '--use-system-libraries' This could take a while... ERROR: Error installing colorls: ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.5.0/gems/clocale-0.0.4/ext/clocale
/usr/bin/ruby2.5 -r ./siteconf20190817-3753-17c9swx.rb extconf.rb --use-system-libraries checking for locale.h... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.5
/usr/lib/ruby/2.5.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.5.0/mkmf.rb:590:in
try_cpp'
from /usr/lib/ruby/2.5.0/mkmf.rb:1097:in block in have_header' from /usr/lib/ruby/2.5.0/mkmf.rb:947:in
block in checking_for'
from /usr/lib/ruby/2.5.0/mkmf.rb:350:in block (2 levels) in postpone' from /usr/lib/ruby/2.5.0/mkmf.rb:320:in
open'
from /usr/lib/ruby/2.5.0/mkmf.rb:350:in block in postpone' from /usr/lib/ruby/2.5.0/mkmf.rb:320:in
open'
from /usr/lib/ruby/2.5.0/mkmf.rb:346:in postpone' from /usr/lib/ruby/2.5.0/mkmf.rb:946:in
checking_for'
from /usr/lib/ruby/2.5.0/mkmf.rb:1096:in have_header' from extconf.rb:9:in
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/clocale-0.0.4/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.5.0/gems/clocale-0.0.4 for inspection. Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/clocale-0.0.4/gem_make.out
➜
You have to install a C compiler and make, and the ruby dev package.
On August 17, 2019 2:00:03 PM GMT+02:00, mrjayviper [email protected] wrote:
setup:>
- Ubuntu (app is displayed as Ubuntu (not Ubuntu 18.04 or Ubuntu 16.04. just Ubuntu)) inside Windows AppStore>
- tried with "ruby" and "ruby-full" apt packages>
- tried with and without "-- --use-system-libraries"> -----------------> This is error I'm getting. Any ideas on how to fix? Thanks>
➜ sudo gem install colorls -- --use-system-libraries> Building native extensions with: '--use-system-libraries'> This could take a while...> ERROR: Error installing colorls:> ERROR: Failed to build gem native extension.>
current directory: /var/lib/gems/2.5.0/gems/clocale-0.0.4/ext/clocale> /usr/bin/ruby2.5 -r ./siteconf20190817-3753-17c9swx.rb extconf.rb --use-system-libraries> checking for locale.h... *** extconf.rb failed ***> Could not create Makefile due to some reason, probably lack of necessary> libraries and/or headers. Check the mkmf.log file for more details. You may> need configuration options.>
Provided configuration options:> --with-opt-dir> --without-opt-dir> --with-opt-include> --without-opt-include=${opt-dir}/include> --with-opt-lib> --without-opt-lib=${opt-dir}/lib> --with-make-prog> --without-make-prog> --srcdir=.> --curdir> --ruby=/usr/bin/$(RUBY_BASE_NAME)2.5> /usr/lib/ruby/2.5.0/mkmf.rb:456:in
try_do': The compiler failed to generate an executable file. (RuntimeError)> You have to install development tools first.> from /usr/lib/ruby/2.5.0/mkmf.rb:590:in
try_cpp'> from /usr/lib/ruby/2.5.0/mkmf.rb:1097:inblock in have_header'> from /usr/lib/ruby/2.5.0/mkmf.rb:947:in
block in checking_for'> from /usr/lib/ruby/2.5.0/mkmf.rb:350:inblock (2 levels) in postpone'> from /usr/lib/ruby/2.5.0/mkmf.rb:320:in
open'> from /usr/lib/ruby/2.5.0/mkmf.rb:350:inblock in postpone'> from /usr/lib/ruby/2.5.0/mkmf.rb:320:in
open'> from /usr/lib/ruby/2.5.0/mkmf.rb:346:inpostpone'> from /usr/lib/ruby/2.5.0/mkmf.rb:946:in
checking_for'> from /usr/lib/ruby/2.5.0/mkmf.rb:1096:inhave_header'> from extconf.rb:9:in
'> To see why this extension failed to compile, please check the mkmf.log which can be found here:>
/var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/clocale-0.0.4/mkmf.log>
extconf failed, exit code 1>
Gem files will remain installed in /var/lib/gems/2.5.0/gems/clocale-0.0.4 for inspection.> Results logged to /var/lib/gems/2.5.0/extensions/x86_64-linux/2.5.0/clocale-0.0.4/gem_make.out>
➜>
-- > You are receiving this because you are subscribed to this thread.> Reply to this email directly or view it on GitHub:> https://github.com/athityakumar/colorls/issues/310
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
For WSL (Windows Subsystem for Linux) you need install build-essential package:
$ sudo apt install build-essential
Having this error. Before finding this I have tried all of the above. GCC installed. Ruby2.5-dev installed, essentials alreaddy newest version.
Ok - doing the 3 things above and using the command provided by OP
sudo gem install colorls -- --use-system-libraries
As I mentioned, I had the others already, so for me -- --use-sys... worked for me. Obviously not the solution to the original guy though.
Im using Ubuntu inside WSL 2.0
Hmm...I don't use WSL 2.0 (just WSL 1), but try the following commands (yes...in that order) and see if that helps. I always use these commands at fresh WSL installs to install colorls on WSL:
$ sudo apt install ruby ruby-dev ruby-colorize
$ sudo apt install build-essential
$ sudo apt install libncurses5-dev
$ sudo gem install colorls
Hopefully, this works on your case. Good luck ^-^
Well like I said below, it works fine with the —site-packages command or whatever (I’m on my phone). I was stating my platform just as a reference to the OP e g wsl Ubuntu works.
I’ve messed with this environment a lot so I can’t rule out other changes that are also dependencies. But it works as expected.
It would be nice to have this as a compiled binary available via apt.
On Dec 18, 2020, at 4:40 PM, SeikyouP [email protected] wrote:
Hmm...I don't use WSL 2.0 (just WSL 1), but try the following commands (yes...in that order) and see if that helps. I always use these commands at fresh WSL installs to install colorls on WSL:
$ sudo apt install ruby ruby-dev ruby-colorize $ sudo apt install build-essential $ sudo apt install libncurses5-dev $ sudo gem install colorls Hopefully, this works on your case. Good luck ^-^
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.