athityakumar/colorls

collect2 missing error install

JosueGauthier opened this issue · 1 comments

collect2 missing error install

Hello,

I try to install colorls but i get the error :

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

    current directory: /home/gauthier/.gem/gems/clocale-0.0.4/ext/clocale
/snap/bin/ruby 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=/var/lib/snapd/snap/ruby/317/bin/$(RUBY_BASE_NAME)
	--with-locale-dir
	--without-locale-dir
	--with-locale-include
	--without-locale-include=${locale-dir}/include
	--with-locale-lib
	--without-locale-lib=${locale-dir}/lib
/var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:490:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.

	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:616:in `block in try_compile'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:565:in `with_werror'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:616:in `try_compile'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:1157:in `block in have_header'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:989:in `block in checking_for'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:354:in `block (2 levels) in postpone'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:324:in `open'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:354:in `block in postpone'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:324:in `open'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:350:in `postpone'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:988:in `checking_for'
	from /var/lib/snapd/snap/ruby/317/lib/ruby/3.2.0/mkmf.rb:1156: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:

/home/gauthier/.gem/extensions/x86_64-linux/3.2.0/clocale-0.0.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/gauthier/.gem/gems/clocale-0.0.4 for inspection.
Results logged to /home/gauthier/.gem/extensions/x86_64-linux/3.2.0/clocale-0.0.4/gem_make.out

And when i go to the mkmf.log the error is : collect2: error: ld returned 1 exit status

Any idea what collect2 is and how to solve this problem ?

Thanks,

  • Relevant Issues : (none)
  • Relevant PRs : (none)
  • Type of issue :
    • Installation
    • Font-related
    • Feature request
    • Bug in existing feature
    • Developer mode : Code quality / Tests / Documentation
avdv commented

And when i go to the mkmf.log the error is : collect2: error: ld returned 1 exit status

Any idea what collect2 is and how to solve this problem ?

collect2 is part of the C compiler toolchain. And ld is the linker. So the linker failed for some reason, there should be a message about the cause. You're probably missing some library...