Skip to content

Instantly share code, notes, and snippets.

@jandersson
Last active September 21, 2020 21:26
Show Gist options
  • Save jandersson/ac1af88c037abf6e807750a5b72c5294 to your computer and use it in GitHub Desktop.
Save jandersson/ac1af88c037abf6e807750a5b72c5294 to your computer and use it in GitHub Desktop.
Installing lich on Raspi

Documenting the steps to get lich going on a raspi while trying to follow the lichproject.org ubuntu 14.10 instructions.

Specs

pi@vaxtron:~ $ neofetch
  `.::///+:/-.        --///+//-:``    pi@vaxtron
 `+oooooooooooo:   `+oooooooooooo:    ----------
  /oooo++//ooooo:  ooooo+//+ooooo.    OS: Raspbian GNU/Linux 10 (buster) armv7l
  `+ooooooo:-:oo-  +o+::/ooooooo:     Host: Raspberry Pi 2 Model B Rev 1.1
   `:oooooooo+``    `.oooooooo+-      Kernel: 4.19.97-v7+
     `:++ooo/.        :+ooo+/.`       Uptime: 9 days, 21 hours, 47 mins
        ...`  `.----.` ``..           Packages: 1485 (dpkg)
     .::::-``:::::::::.`-:::-`        Shell: bash 5.0.3
    -:::-`   .:::::::-`  `-:::-       Terminal: /dev/pts/0
   `::.  `.--.`  `` `.---.``.::`      CPU: BCM2835 (4) @ 900MHz
       .::::::::`  -::::::::` `       Memory: 84MiB / 926MiB
 .::` .:::::::::- `::::::::::``::.
-:::` ::::::::::.  ::::::::::.`:::-
::::  -::::::::.   `-::::::::  ::::
-::-   .-:::-.``....``.-::-.   -::-
 .. ``       .::::::::.     `..`..
   -:::-`   -::::::::::`  .:::::`
   :::::::` -::::::::::` :::::::.
   .:::::::  -::::::::. ::::::::
    `-:::::`   ..--.`   ::::::.
      `...`  `...--..`  `...`
            .::::::::::
             `.-::::-`

Working Steps

The following is the steps taken from lichproject.org ubuntu 14.10 with additional steps discovered from the troubleshooting log:

sudo apt-get install ruby
sudo apt-get install ruby-dev wine libsqlite3-dev libgtk2.0-dev gobject-introspection libgirepository1.0-dev
sudo gem install rake sqlite3 gtk2 --no-ri --no-rdoc

Note this is what apt-get install ruby installed.

pi@vaxtron:~ $ ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [arm-linux-gnueabihf]

Troubleshooting log

sudo apt-get install ruby

sudo apt-get install ruby-dev wine libsqlite3-dev

sudo gem install sqlite3 gtk2 --no-ri --no-rdoc

This should fail due to missing libraries for gtk2

ERROR:  Error installing gtk2:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/glib2-3.4.3/ext/glib2
/usr/bin/ruby2.5 -r ./siteconf20200530-1013-1i22zft.rb extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wout-of-line-declaration option to compiler... no
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for Homebrew... no
checking for gobject-2.0 version (>= 2.12.0)... 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.

sudo apt-get install libgtk2.0-dev

sudo sudo gem install sqlite3 gtk2 --no-ri --no-rdoc

Second error due to missing libraries

pi@vaxtron:~ $ sudo gem install sqlite3 gtk2 --no-ri --no-rdoc
Building native extensions. This could take a while...
^[[A^[[BSuccessfully installed sqlite3-1.4.2
Building native extensions. This could take a while...
Successfully installed glib2-3.4.3
Fetching: atk-3.4.3.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing gtk2:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/atk-3.4.3/dependency-check
/usr/bin/ruby2.5 -rrubygems /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake RUBYARCHDIR=/var/lib/gems/2.5.0/extensions/arm-linux/2.5.0/atk-3.4.3 RUBYLIBDIR=/var/lib/gems/2.5.0/extensions/arm-linux/2.5.0/atk-3.4.3
/usr/bin/ruby2.5: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-12.3.1/exe/rake (LoadError)

rake failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/atk-3.4.3 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/arm-linux/2.5.0/atk-3.4.3/gem_make.out
1 gem installed

sudo gem install rake

New error (progress?)

pi@vaxtron:~ $ sudo gem install sqlite3 gtk2 --no-ri --no-rdoc
Building native extensions. This could take a while...
Successfully installed sqlite3-1.4.2
Building native extensions. This could take a while...
Successfully installed atk-3.4.3
Fetching: cairo-1.16.5.gem (100%)
Building native extensions. This could take a while...
Successfully installed cairo-1.16.5
Fetching: cairo-gobject-3.4.3.gem (100%)
Building native extensions. This could take a while...
Successfully installed cairo-gobject-3.4.3
Fetching: gobject-introspection-3.4.3.gem (100%)
Building native extensions. This could take a while...
ERROR:  Error installing gtk2:
        ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/gobject-introspection-3.4.3/ext/gobject-introspection
/usr/bin/ruby2.5 -r ./siteconf20200530-6494-14s7lup.rb extconf.rb
checking for --enable-debug-build option... no
checking for -Wall option to compiler... yes
checking for -Waggregate-return option to compiler... yes
checking for -Wcast-align option to compiler... yes
checking for -Wextra option to compiler... yes
checking for -Wformat=2 option to compiler... yes
checking for -Winit-self option to compiler... yes
checking for -Wlarger-than-65500 option to compiler... yes
checking for -Wmissing-declarations option to compiler... yes
checking for -Wmissing-format-attribute option to compiler... yes
checking for -Wmissing-include-dirs option to compiler... yes
checking for -Wmissing-noreturn option to compiler... yes
checking for -Wmissing-prototypes option to compiler... yes
checking for -Wnested-externs option to compiler... yes
checking for -Wold-style-definition option to compiler... yes
checking for -Wpacked option to compiler... yes
checking for -Wp,-D_FORTIFY_SOURCE=2 option to compiler... yes
checking for -Wpointer-arith option to compiler... yes
checking for -Wundef option to compiler... yes
checking for -Wout-of-line-declaration option to compiler... no
checking for -Wunsafe-loop-optimizations option to compiler... yes
checking for -Wwrite-strings option to compiler... yes
checking for Homebrew... no
checking for gobject-introspection-1.0... 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)2.5
        --enable-debug-build
        --disable-debug-build
        --with-pkg-config
        --without-pkg-config
        --with-override-variables
        --without-override-variables

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/arm-linux/2.5.0/gobject-introspection-3.4.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.5.0/gems/gobject-introspection-3.4.3 for inspection.
Results logged to /var/lib/gems/2.5.0/extensions/arm-linux/2.5.0/gobject-introspection-3.4.3/gem_make.out
1 gem installed

sudo apt-get install gobject-introspection

sudo gem install sqlite3 gtk2 --no-ri --no-rdoc

Same error when installing gems

sudo apt-get install libgirepository1.0-dev

sudo gem install sqlite3 gtk2 --no-ri --no-rdoc

Success

pi@vaxtron:~ $ sudo gem install sqlite3 gtk2 --no-ri --no-rdoc
Building native extensions. This could take a while...
Successfully installed sqlite3-1.4.2
Building native extensions. This could take a while...
Successfully installed gobject-introspection-3.4.3
Fetching: pango-3.4.3.gem (100%)
Building native extensions. This could take a while...
Successfully installed pango-3.4.3
Fetching: gio2-3.4.3.gem (100%)
Building native extensions. This could take a while...
Successfully installed gio2-3.4.3
Fetching: gdk_pixbuf2-3.4.3.gem (100%)
Building native extensions. This could take a while...
Successfully installed gdk_pixbuf2-3.4.3
Fetching: gtk2-3.4.3.gem (100%)
Building native extensions. This could take a while...

Successfully installed gtk2-3.4.3
6 gems installed

References

@jbrock24
Copy link

Just followed this for WSL2 Kali install, worked well. Every step matched! Nice one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment