topfunky / gruff

Gruff graphing library for Ruby
http://gruff.rubyforge.org
MIT License
1.37k stars 239 forks source link

Installing gruff gem in Ubuntu fails - problem solved #628

Closed innersund closed 10 months ago

innersund commented 10 months ago

Description

Install gruff fails due to missing dependencies. Diagnostic output is to no help.

$ sudo gem install rmagick Building native extensions. This could take a while... ERROR: Error installing rmagick: ERROR: Failed to build gem native extension.

[... long list of not very helpful messages ...] checking for brew... no checking for pacman... no checking for Ruby version >= 2.3.0... yes extconf.rb failed

$ sudo gem install gruff Building native extensions. This could take a while...

[similar list of messages]

[content of mkmf.log] $ cat /var/lib/gems/3.0.0/extensions/x86_64-linux/3.0.0/rmagick-5.3.0/mkmf.log find_executable: checking for brew... -------------------- no -------------------- find_executable: checking for pacman... -------------------- no -------------------- assert_minimum_ruby_version!: checking for Ruby version >= 2.3.0... -------------------- yes --------------------

System Configuration

$ identify --version Version: ImageMagick 6.9.11-60 Q16 x86_64 2021-01-25 https://imagemagick.org

$ cat //etc/os-release PRETTY_NAME="Ubuntu 22.04.3 LTS"

Solution

After extensive search I stumbled upon the solution on https://stackoverflow.com/questions/4899376/installing-rmagick-gem

$ sudo apt install libmagickwand-dev ... 63 new packages ...

then $ sudo gem install rmagick Building native extensions. This could take a while... Successfully installed rmagick-5.3.0

$ sudo gem install gruff Successfully installed histogram-0.2.4.1 Successfully installed gruff-0.23.0

Maybe make a note of this in the documentation on how to install gruff? And please excuse me if I have made formal mistakes in my publishing, I am a newbee on Github.

innersund commented 10 months ago

The solution was closer than I thought, just follow the instruction for installing rmagick on Ubuntu: https://github.com/rmagick/rmagick?tab=readme-ov-file#installing-rmagick