ruby - Failed to install gem mysql2 on Ubuntu 16.04.3 LTS -
when run gem install mysql2
command following error message:
building native extensions. take while... error: error installing mysql2: error: failed build gem native extension. ... not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options. ... see why extension failed compile, please check mkmf.log can found here: /home/lucivaldo/.rvm/gems/ruby-2.4.0/extensions/x86_64-linux/2.4.0/mysql2-0.4.9/mkmf.log extconf failed, exit code 1 gem files remain installed in /home/lucivaldo/.rvm/gems/ruby-2.4.0/gems/mysql2-0.4.9 inspection. results logged /home/lucivaldo/.rvm/gems/ruby-2.4.0/extensions/x86_64-linux/2.4.0/mysql2-0.4.9/gem_make.out
looking @ log file described @ end of message noticed library missing.
how solve problem?
searching here in stack overflow itself, found solution problem similar following command, solves problem:
sudo apt install libgmp3-dev
Comments
Post a Comment