Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Colorls Installtion is not working for Ubuntu 20.04.1 LTS #435

Closed
1 of 5 tasks
Yatharth0045 opened this issue Jan 12, 2021 · 5 comments
Closed
1 of 5 tasks

Colorls Installtion is not working for Ubuntu 20.04.1 LTS #435

Yatharth0045 opened this issue Jan 12, 2021 · 5 comments

Comments

@Yatharth0045
Copy link

Description

Following the installation steps as provided but shows error in installing colorls in Ubuntu 20.04.1 LTS

Steps to recreate

Install Ruby Packages

sudo apt install ruby ruby-dev ruby-colorize

Install colorls

sudo gem install colorls

Error

Building native extensions. This could take a while...
ERROR:  Error installing colorls:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.7.0/gems/clocale-0.0.4/ext/clocale
/usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20210112-88249-1y1omim.rb extconf.rb
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.7
	--with-locale-dir
	--without-locale-dir
	--with-locale-include
	--without-locale-include=${locale-dir}/include
	--with-locale-lib
	--without-locale-lib=${locale-dir}/lib
/usr/lib/ruby/2.7.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
	from /usr/lib/ruby/2.7.0/mkmf.rb:613:in `try_cpp'
	from /usr/lib/ruby/2.7.0/mkmf.rb:1124:in `block in have_header'
	from /usr/lib/ruby/2.7.0/mkmf.rb:971:in `block in checking_for'
	from /usr/lib/ruby/2.7.0/mkmf.rb:361:in `block (2 levels) in postpone'
	from /usr/lib/ruby/2.7.0/mkmf.rb:331:in `open'
	from /usr/lib/ruby/2.7.0/mkmf.rb:361:in `block in postpone'
	from /usr/lib/ruby/2.7.0/mkmf.rb:331:in `open'
	from /usr/lib/ruby/2.7.0/mkmf.rb:357:in `postpone'
	from /usr/lib/ruby/2.7.0/mkmf.rb:970:in `checking_for'
	from /usr/lib/ruby/2.7.0/mkmf.rb:1123:in `have_header'
	from extconf.rb:9:in `<main>'

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/clocale-0.0.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.7.0/gems/clocale-0.0.4 for inspection.
Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/clocale-0.0.4/gem_make.out
  • Type of issue :
    • Installation
    • Font-related
    • Feature request
    • Bug in existing feature
    • Developer mode : Code quality / Tests / Documentation
@avdv
Copy link
Collaborator

avdv commented Jan 12, 2021

Have a look at this file: /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/clocale-0.0.4/mkmf.log

What does it say?

@Yatharth0045
Copy link
Author

@avdv Here

"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.7.0 -I/usr/include/ruby-2.7.0/ruby/backward -I/usr/include/ruby-2.7.0 -I. -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -fdebug-prefix-map=/build/ruby2.7-W7xcA4/ruby2.7-2.7.0=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC conftest.c  -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic     -lruby-2.7  -lm   -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return !!argv[argc];
6: }
/* end */

@avdv
Copy link
Collaborator

avdv commented Jan 12, 2021

Isn't there some more context? Do you have a C compiler installed?

@Yatharth0045
Copy link
Author

Thanks @avdv , gcc was not available at first. Now, it worked.

Solution:

sudo apt install gcc make

@Yatharth0045
Copy link
Author

Good to be closed now.
Thanks for the help @avdv

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants