Multiple failures with “gem update –user-install”

I’ve been having some major issues with installing this on Ubuntu (ver.2204.2.33.0). I originally had a problem with the directory, but I was able to fix it. However, I now have other problems that come up:

Updating installed gems
Updating fiddle
Building native extensions. This could take a while...
ERROR:  Error installing fiddle:
        ERROR: Failed to build gem native extension.

    current directory: /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/fiddle-1.1.1/ext/fiddle
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230915-12551-w70e6n.rb extconf.rb
checking for --enable-debug-build option... no
checking for ffi.h... no
checking for ffi/ffi.h... no
*** 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)3.0
        --enable-debug-build
        --disable-debug-build
        --with-libffi-source-dir
        --without-libffi-source-dir
        --with-libffi-dir
        --without-libffi-dir
        --with-libffi-include
        --without-libffi-include=${libffi-dir}/include
        --with-libffi-lib
        --without-libffi-lib=${libffi-dir}/lib
        --with-libffi-config
        --without-libffi-config
        --with-pkg-config
        --without-pkg-config
        --with-ffi-dir
        --without-ffi-dir
        --with-ffi-include
        --without-ffi-include=${ffi-dir}/include
        --with-ffi-lib
        --without-ffi-lib=${ffi-dir}/lib
extconf.rb:73:in `<main>': missing libffi. Please install libffi or use --with-libffi-source-dir with libffi source location. (RuntimeError)

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

  /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/fiddle-1.1.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/fiddle-1.1.1 for inspection.
Results logged to /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/fiddle-1.1.1/gem_make.out
Updating openssl
Building native extensions. This could take a while...
ERROR:  Error installing openssl:
        ERROR: Failed to build gem native extension.

    current directory: /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/openssl-3.1.0/ext/openssl
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230915-12551-opxb8f.rb extconf.rb
checking for rb_io_maybe_wait(0, Qnil, Qnil, Qnil) in ruby/io.h... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for openssl/ssl.h... no
*** 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)3.0
        --with-openssl-dir
        --without-openssl-dir
        --with-openssl-include
        --without-openssl-include=${openssl-dir}/include
        --with-openssl-lib
        --without-openssl-lib=${openssl-dir}/lib
        --with-kerberos-dir
        --without-kerberos-dir
        --with-kerberos-include
        --without-kerberos-include=${kerberos-dir}/include
        --with-kerberos-lib
        --without-kerberos-lib=${kerberos-dir}/lib
        --with-debug
        --without-debug
        --enable-debug
        --disable-debug
        --with-nsl-dir
        --without-nsl-dir
        --with-nsl-include
        --without-nsl-include=${nsl-dir}/include
        --with-nsl-lib
        --without-nsl-lib=${nsl-dir}/lib
        --with-nsllib
        --without-nsllib
        --with-socket-dir
        --without-socket-dir
        --with-socket-include
        --without-socket-include=${socket-dir}/include
        --with-socket-lib
        --without-socket-lib=${socket-dir}/lib
        --with-socketlib
        --without-socketlib
        --with-openssl-config
        --without-openssl-config
        --with-pkg-config
        --without-pkg-config
extconf.rb:101:in `<main>': OpenSSL library could not be found. You might want to use --with-openssl-dir=<dir> option to specify the prefix where OpenSSL is installed. (RuntimeError)

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

  /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/openssl-3.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/openssl-3.1.0 for inspection.
Results logged to /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/openssl-3.1.0/gem_make.out
Updating psych
Building native extensions. This could take a while...
ERROR:  Error installing psych:
        ERROR: Failed to build gem native extension.

    current directory: /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/psych-5.1.0/ext/psych
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230915-12551-pmxqyr.rb extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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)3.0
        --with-libyaml-source-dir
        --without-libyaml-source-dir
        --with-yaml-0.1-config
        --without-yaml-0.1-config
        --with-pkg-config
        --without-pkg-config
        --with-libyaml-dir
        --without-libyaml-dir
        --with-libyaml-include
        --without-libyaml-include=${libyaml-dir}/include
        --with-libyaml-lib
        --without-libyaml-lib=${libyaml-dir}/lib

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

  /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/psych-5.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/psych-5.1.0 for inspection.
Results logged to /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/psych-5.1.0/gem_make.out
Updating rdoc
Building native extensions. This could take a while...
ERROR:  Error installing rdoc:
        ERROR: Failed to build gem native extension.

    current directory: /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/psych-5.1.0/ext/psych
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230915-12551-oh8l86.rb extconf.rb
checking for yaml.h... no
yaml.h not found
*** 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)3.0
        --with-libyaml-source-dir
        --without-libyaml-source-dir
        --with-yaml-0.1-config
        --without-yaml-0.1-config
        --with-pkg-config
        --without-pkg-config
        --with-libyaml-dir
        --without-libyaml-dir
        --with-libyaml-include
        --without-libyaml-include=${libyaml-dir}/include
        --with-libyaml-lib
        --without-libyaml-lib=${libyaml-dir}/lib

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

  /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/psych-5.1.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/psych-5.1.0 for inspection.
Results logged to /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/psych-5.1.0/gem_make.out
Updating readline-ext
Building native extensions. This could take a while...
ERROR:  Error installing readline-ext:
        ERROR: Failed to build gem native extension.

    current directory: /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/readline-ext-0.1.5/ext/readline
/usr/bin/ruby3.0 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20230915-12551-vy0vj5.rb extconf.rb
checking for tgetnum() in -lncurses... no
checking for tgetnum() in -ltermcap... no
checking for tgetnum() in -lcurses... no
checking for readline/readline.h... no
checking for editline/readline.h... no
*** 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)3.0
        --with-curses-dir
        --without-curses-dir
        --with-curses-include
        --without-curses-include=${curses-dir}/include
        --with-curses-lib
        --without-curses-lib=${curses-dir}/lib
        --with-ncurses-dir
        --without-ncurses-dir
        --with-ncurses-include
        --without-ncurses-include=${ncurses-dir}/include
        --with-ncurses-lib
        --without-ncurses-lib=${ncurses-dir}/lib
        --with-termcap-dir
        --without-termcap-dir
        --with-termcap-include
        --without-termcap-include=${termcap-dir}/include
        --with-termcap-lib
        --without-termcap-lib=${termcap-dir}/lib
        --with-readline-dir
        --without-readline-dir
        --with-readline-include
        --without-readline-include=${readline-dir}/include
        --with-readline-lib
        --without-readline-lib=${readline-dir}/lib
        --enable-libedit
        --disable-libedit
        --with-ncurseslib
        --without-ncurseslib
        --with-termcaplib
        --without-termcaplib
        --with-curseslib
        --without-curseslib
        --with-editline-dir
        --without-editline-dir
        --with-editline-include
        --without-editline-include=${editline-dir}/include
        --with-editline-lib
        --without-editline-lib=${editline-dir}/lib
extconf.rb:62:in `<main>': Neither readline nor libedit was found (RuntimeError)

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

  /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/readline-ext-0.1.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /home/perfectangel/.local/share/gem/ruby/3.0.0/gems/readline-ext-0.1.5 for inspection.
Results logged to /home/perfectangel/.local/share/gem/ruby/3.0.0/extensions/x86_64-linux/3.0.0/readline-ext-0.1.5/gem_make.out

It just won’t install completely for some reason and it doesn’t help that I’m a complete newbie when it comes to this. So, I would really appreciate it if I could get some advice/solutions here.

Leave a Comment