Skip to content

Can't install via gem, and from sources forces system-wide install? #6

@depesz

Description

@depesz

While tryign to install from gem, I'm getting:

=$ gem install --user-install  ruby-terminfo
WARNING:  You don't have /home/depesz/.local/share/gem/ruby/3.1.0/bin in your PATH,
          gem executables will not run.
Building native extensions. This could take a while...
ERROR:  Error installing ruby-terminfo:
        ERROR: Failed to build gem native extension.

    current directory: /home/depesz/.local/share/gem/ruby/3.1.0/gems/ruby-terminfo-0.1.1
/usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20231112-128421-p9uy6m.rb extconf.rb
checking for setupterm() in -lncurses... yes
checking for rb_io_t in ruby.h,rubyio.h... no
checking for rb_io_t.fd in ruby.h,rubyio.h... no
checking for OpenFile.fd in ruby.h,rubyio.h... no
creating extconf.h
creating Makefile

current directory: /home/depesz/.local/share/gem/ruby/3.1.0/gems/ruby-terminfo-0.1.1
make DESTDIR\= clean

current directory: /home/depesz/.local/share/gem/ruby/3.1.0/gems/ruby-terminfo-0.1.1
make DESTDIR\=
compiling terminfo.c
terminfo.c:33:10: fatal error: rubyio.h: No such file or directory
   33 | #include "rubyio.h"
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:253: terminfo.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/depesz/.local/share/gem/ruby/3.1.0/gems/ruby-terminfo-0.1.1 for inspection.
Results logged to /home/depesz/.local/share/gem/ruby/3.1.0/extensions/x86_64-linux/3.1.0/ruby-terminfo-0.1.1/gem_make.out

And installing from sources, it tries to install to system-wide directories, which i don't have access to:

14:57:52 depesz@lana ssh:2 !agentSSH ~/tmp/q/ruby-terminfo-0.2
=$ ruby extconf.rb 
checking for curses.h... yes
checking for term.h... yes
checking for ctermid() in stdio.h... yes
checking for setupterm() in -lncurses... yes
checking for ncurses.h... yes
checking for wchar.h... yes
checking for ruby/io.h... yes
checking for rb_io_t in ruby.h,ruby/io.h... yes
checking for rb_io_t.fd in ruby.h,ruby/io.h... yes
checking for ruby/encoding.h... yes
creating extconf.h
creating Makefile

14:58:02 depesz@lana ssh:2 !agentSSH ~/tmp/q/ruby-terminfo-0.2
=$ make
compiling terminfo.c
terminfo.c: In function ‘Init_terminfo’:
terminfo.c:409:3: warning: ‘rb_cData’ is deprecated: by: rb_cObject.  Will be removed in 3.1. [-Wdeprecated-declarations]
  409 |   cTermInfo = rb_define_class("TermInfo", rb_cData);
      |   ^~~~~~~~~
In file included from /usr/include/ruby-3.1.0/ruby/internal/core.h:27,
                 from /usr/include/ruby-3.1.0/ruby/ruby.h:28,
                 from /usr/include/ruby-3.1.0/ruby.h:38,
                 from terminfo.c:32:
/usr/include/ruby-3.1.0/ruby/internal/core/rdata.h:382:1: note: declared here
  382 | rb_cData(void)
      | ^~~~~~~~
linking shared-object terminfo.so

14:59:26 depesz@lana ssh:2 !agentSSH ~/tmp/q/ruby-terminfo-0.2
=$ make install
/bin/mkdir: cannot create directory ‘/usr/local/lib/x86_64-linux-gnu/site_ruby’: Permission denied
make: *** [Makefile:207: .sitearchdir.time] Error 1

What can I do about it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions