Install autoreconf on OS X v10.7 (Lion)? - macos

I'm attempting to re-install Ruby 1.9.3 with a patch that will allow me to use ruby-debug.
When following the instructions and running
rvm reinstall 1.9.3 --patch debug --force-autoconf
It runs through and after applying the patch spits out:
rvm requires autoreconf to install the selected ruby interpreter however autoreconf was not found in the PATH.
Unfortunately, googling around for how to install autoreconf on OS X v10.7 (Lion) (or much information about it at all) seems to be a dead end.

If you are using Homebrew, try
brew install automake
Which should also install autoconf and allow rvm to finish installing.

If you want to do this using MacPorts instead of Homebrew, you can do:
sudo port install automake autoconf libtool
I had the same problem and this solved it for me.

If you're using brew, then the autoreconf utility is part of the autoconf package, so install it via:
brew install autoconf
If the problem persists, consider either reinstall or link it again. Use locate autoreconf to find out where it is.
Also check if /usr/local/bin/autoreconf exists (and is linked into the right place), and you've the /usr/local/bin path added in your /etc/paths file.

By downloading the .pkg file from MacPorts and installing it, it does the trick for me.

I had a similar problem, but because Homebrew moved away from the Cellar directory, but for some reasons binaries of this package were still there.
I reinstalled autoconf with the following command and autoreconf is in the right PATH now: brew reinstall autoconf

I solved my autoreconf problem adding the path to my shell:
sudo pico /etc/paths
then I added the line
/sw/bin
where I found the autoreconf and autoconf files and saved everything.
Since then I can use autoreconf without any problems.

Related

RVM requirements error

I have OS X Mavericks installed and I'm trying to run rvm requirements in terminal and it gives me this error.
Installing required packages: autoconf, automake, libtool, pkgconfig, libyaml, libffi, readline, libksba, curl-ca-bundle, gdbm.............
Error running 'requirements_osx_port_libs_install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm',
please read /Users/Alex/.rvm/log/ruby-1.9.3-p448/1374263757_package_install_autoconf_automake_libtool_pkgconfig_libyaml_libffi_readline_libksba_curl-ca-bundle_gdbm.log
Requirements installation failed with status: 1.
It looks like RVM tried to install some dependencies using Macports and Macports proceeded to get really confused about dependencies when it tried to install autoconf.
Try running:
brew install autoconf
Otherwise you should run this bash script:
https://gist.github.com/siraj/1399288
Assuming you have brew, which you should if you don't.
If your Macports just isn't working, then you can manually install all of the requirements like this:
brew install autoconf automake libtool pkgconfig libyaml libffi readline libksba curl-ca-bundle gdbm
I tried the above, and a few other things. None worked.
It seems that on OSX 10.9 and XCode5 moved some libs around on us. So I had to install XCode5-DP6 (Dev Preview 6), opened up DP6 and in the settings, you have to tell the command line tools to use the new DP6 build and not the Standard XCode from the marketplace.
First, I had to install homebrew. Nothing liked to play with macports. I am on my first mac as of only a month ago, so macports was just what solved apache for me at the time. I then had to run 'brew install autoconf'
Once I did that I then ran rvm requirements, everything installed without issue. then sudo gem install jekyll from there and it all works like a charm now.
I'm sure once Mavericks is actually released this will get ironed out. We are using early releases after all...
Hope this works for you guys.

Error installing any ruby version with RVM on OSX

Guys I'm about to kill myself with this one!
I had some problems with RVM installing multiple versions of Ruby, and following a thread on Stackoverflow I decided to remove it completely. After reinstalling RVM, I am unable to install any Ruby version at all.
Mac OS X
RVM 1.20.10 stable
Homebrew 0.9.4
Here are some logs:
rvm install 2.0.0-p0
or:
rvm install 2.0.0-p195 --autolibs=enabled
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Already up-to-date.
Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxml2, libxslt, libksba, openssl…
Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config libyaml readline libxml2 libxslt libksba openssl',
please read /Users/admin/.rvm/log/ruby-2.0.0-p0/1368903329_package_install_autoconf_automake_libtool_pkg-config_libyaml_readline_libxml2_libxslt_libksba_openssl.log
Logfile reads:
[2013-05-18 22:55:29] requirements_osx_brew_libs_install
Error: No such keg: /usr/local/Cellar/autoconf
There were package installation errors, make sure to read the log.
Check Homebrew requirements github.com/mxcl/homebrew/wiki/Installation
brew doctor
Your system is ready to brew.
brew cleanup
Removing: /Library/Caches/Homebrew/automake-1.13.1.tar.gz…
Error: Permission denied — /Library/Caches/Homebrew/automake-1.13.1.tar.gz
brew reinstall autoconf
Error: No such keg: /usr/local/Cellar/autoconf
Help!
I ran into the same issue, you need to manually install all the required packages using Brew. For me I had to run the following installs:
brew install autoconf
brew install automake
brew install libtool
brew install apple-gcc42
brew install libyaml
brew install libxslt
brew install libksba
brew install openssl
You just need to keep running "rvm requirements" and reading the log and installing the packages needed until there are no more errors.
After installing RVM, You'll want to run
rvm requirements
to see if anything else is required to install ruby and rails first.
here is the similar question asked rvm install ruby
This solved problem for me
sudo chown -R `whoami` /Library/Caches/Homebrew/
I had the same problem
brew install pkg-config
worked for me
I aswell ran into the permission problem. My /usr/local/opt where the packages are linked had permissions root:wheel. I changed permissions by doing
sudo chown -R <localuser>:staff /usr/local/opt
where of course "localuser" is your local user you used to install brew.
Then aswell I had to run
brew reinstall autoconf
and so on instead of just "install", since brew always kept on saying the lib already was installed (yet not linked). "reinstall" simply forces a new install of the package. that did the trick for me.
Hope this helps someone with similar problems.
User which is running brew should have write access to This entire directory path
/Library/Caches/Homebrew/Formula
No need to change ownership just write permission. then running rvm works
I was encountering similar issues, particular around the install of openssl098. I came across this Homebrew issue, tried rvm get head as suggested, and now rvm works perfectly.
I'd try to install Xcode Command Line Tools before.
Try
rvm reinstall ruby-2.3.1 --with-openssl-dir=`brew --prefix openssl`
rvm openssl on Mojave

Homebrew (Mac): cannot install libksba or dependency libgpg-error

I'm setting up a new Mac for development with Ruby on Rails. I have installed XCode (including command line tools), Homebrew, and RVM properly. However, when I try to install the 2.0.0 Ruby version via RVM, I keep having to install libksba, which tries to install the dependency libgpg-error. The log tells me it's downloading the file, but it never does anything. I've let it run for 30 minutes before and still doesn't do anything. The file is supposed to be a few hundred KB, so it's not very large...Below is the code I'm running:
$ brew install libksba
==> Installing libksba dependency: libgpg-error
==> Downloading ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.11.tar.bz
This will just sit there and do nothing. Is there another repository where I can download the file from and manually install it? It's frustrating to not be able to develop because of simple dependency errors. Any suggestions would be greatly appreciated.
These are the formulas associated with libksba and libpgp-error: Homebrew Libksba Formula and Homebrew Libgpg-Error. Try first updating Homebrew, since the discrepancy between the version shown in your logs and the one in the repo tells me is outdated:
brew update
brew install libksba
If that doenst work, then you can download it from here:
url 'ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.3.0.tar.bz2'
url 'ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.11.tar.bz2'
mirror 'http://www.mirrorservice.org/sites/ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.11.tar.gz'
So I found out the problem; my network is running through a 2nd router that was blocking FTP. I skipped the 2nd router and connected to the primary router and brew install libksba worked just fine. Credit goes to fmendez who provided a mirror link that led me to check out the router ports for FTP.
For others coming to this question, the above instructions do work for manually downloading and installing the formulas. I also recommend checking out Homebrew Tips n Tricks for additional help on which commands to run.
You can try the following steps ( Ref from here )
cd /usr/local/src
curl -O ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.9.tar.gz
tar -xvf libgpg-error-1.9.tar.gz
cd libgpg-error-1.9/
./configure
make
make install
cd ..
curl -O ftp://ftp.gnupg.org/gcrypt/libksba/libksba-1.2.0.tar.bz2
tar -xvf libksba-1.2.0.tar.bz2
cd libksba-1.2.0/
./configure
make
make install

Cannot install ruby-1.9.2 in Mac OSX 10.8.1 due to symlink error

First, I tried the common rvm install.
rvm install 1.9.2
However, the following error was shown:
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
Then I run
rvm requirements
and find these following part of output useful
Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) and clang, neither of which are supported for building Ruby. Xcode 4.1 was the last version to ship gcc, which was /usr/bin/gcc-4.2.
Xcode 4.1 and earlier:
- Ruby will build fine.
Xcode 4.2 and later (including Command Line Tools for Xcode):
- If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will build fine.
- If you don't have gcc-4.2, you have two options to get it:
* Install apple-gcc42 from Homebrew
* Install osx-gcc-installer
Homebrew:
If you are using Homebrew, you can install the apple-gcc42 and required libraries from homebrew/dupes:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
rvm pkg install openssl
This can live side by side with an existing Xcode 4.2+ install or Command Line Tools for Xcode.
so I tried:
brew update
brew tap homebrew/dupes
brew install autoconf automake apple-gcc42
However, I got the following error
Warning: Could not link apple-gcc42. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link apple-gcc42'
==> Summary
/usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 23 seconds
kanitw:shell.venturelab.com kanitw$ brew link apple-gcc42
Linking /usr/local/Cellar/apple-gcc42/4.2.1-5666.3... Warning: Could not link apple-gcc42. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/apple-gcc42/4.2.1-5666.3/include/gcc
/usr/local/include is not writable. You should change its permissions.
What would be my best solution? I kinda remember from somewhere that I should not use sudo with brew since I will mess up the whole installation.
You can change /usr/local directory owner
sudo chown -R `whoami` /usr/local
But, if you have mysql installed, you mast fix its owner
sudo chown -R mysql:mysql /usr/local/mysql
You should run brew doctor and then change the permissions accordingly. There might be other issues.
Change the permissions of your /usr/local directory and try again.

Can't install RMagick 2.13.1. Can't find MagickWand.h.

When I try do install rmagick I get the following error message:
Can't install RMagick 2.13.1. Can't find MagickWand.h.
*** 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.
I'm on Mac OSX 10.6.8, ruby 1.9.2p290, rvm 1.10.2.
Can anyone help me please to solve this problem.
If you're on Ubuntu, installing this package is what fixed it for me:
sudo apt-get install libmagickwand-dev
It looks like ImageMagick 7 changed include file path.
On building rmagick, since it includes file as wand/MagickWand.h There are no workarounds. It looks like sticking with ImageMagick 6 for now.
On Mac OS X (I tested on Sierra), I used HomeBrew's versions tap like:
brew tap homebrew/versions
brew install imagemagick#6
Then, use the path shown on above installation:
PKG_CONFIG_PATH=/usr/local/opt/imagemagick#6/lib/pkgconfig gem install rmagick
To install with ImageMagick 6.
I didn't want to mess with environment variables since I wanted bundler to be able to compile this gem on its own on a CI machine. Instead, I used Homebrew to install pkg-config:
brew install pkgconfig
and the next time I tried compiling the RMagick gem it found the header file without issue.
(This is pkg-config 0.28, ImageMagick 6.8.0-10, and RMagick 2.13.2, all on Mountain Lion.)
I had a similar issue with running
$ gem install rmagick
First of all, do you have imagemagick installed? If you're not sure, run
$ convert --version
If you do, you probably either installed it with fink or macports (maybe homebrew?). What is happening is that rvm can't find the imagemagick directory.
After reading
https://superuser.com/questions/361435/i-have-compiled-imagemagick-on-my-centos-and-rmagick-wont-install
I exported the imagemagick path by adding
$ export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:$PKG_CONFIG_PATH"
to my ~/.bash_profile, sourcing the new profile, then running:
gem install rmagick
It worked for me after I did this.
fix this setting the include path of your current imagemagick installation:
Install ImageMagick with brew
brew install imagemagick
find library
$ mdfind MagickWand.h
/usr/local/Cellar/imagemagick/6.7.5-7/include/ImageMagick/wand/MagickWand.h
Install rmagick gem
$ C_INCLUDE_PATH=/path/MagickWand.h gem install rmagick
example:
$ C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.5-7/include/ImageMagick/ gem install rmagick
I marked this as a favorite because it seems to come back to bite me with every new system I need to install RMagick on (and time has passed and version numbers have rolled).
Mac OS X 10.8.4
rvm 1.22.3
ruby-2.0.0-p247
Xcode 4.6.3 developer tools installed
$ brew install imagemagick
==> /usr/local/Cellar/imagemagick/6.8.6-3
$ brew install pkgconfig
==> /usr/local/Cellar/pkg-config/0.28
$ C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.6-3/include/ImageMagick-6 PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.8.6-3/lib/pkgconfig/ gem install rmagick
Successfully installed rmagick-2.13.2
Many thanks to everyone who added helpful answers above!
Mac users using brew
If you can use v6 of ImageMagick instead of 7, you can try this
brew install imagemagick#6 --force && brew link imagemagick#6 --force
Note this will unlink your existing IM installation, so be careful if you have other projects on your machine using ImageMagick without problems.
For my own and others edification, I got past the error about the magicwand.h by using the suggestion xonico. MDFind plus the C_INCLUDE_PATH. However, it then gave me an error about MagickCore.pc. My final command to get this working had to include both like so:
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick/ PKG_CONFIG_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/lib/pkgconfig/ gem install rmagick
Obviously your paths will vary depending on whether you're using brew like me and what version of imagemagick you were installing. Also, xcode command line tools did have to be installed, as others have mentioned.
Thanks for everyone's posts on this! I am plussing your answers since it contributed to mine!
For Ubuntu:
sudo apt-get install imagemagick libmagickwand-dev
gem install rmagick
I had a problem after update to Maverics.
It have lost a lot of linkings.
In my case I had to refresh links to pkg-config
brew unlink pkg-config
brew link pkg-config
Then installing rmagick worked like a charm.
I updated to Mountain Lion and started getting this same problem. I had to re-install brew, XCode, the XCode tools - pretty much the whole environment!
I eventually solved this problem using the answer from phopkins above...
brew install pkgconfig
Once that was successfully completed (I had to delete some old symlinks first) then I was able to successfully install the RMagick gem
This worked for me on Mac OsX
Install Imagemagick:
brew remove imagemagick
brew install imagemagick
Make sure pkg-config is correctly linked:
brew uninstall pkg-config
brew install pkg-config
brew unlink pkg-config && brew link pkg-config
Install gem
gem install rmagick
For Ubuntu users:
It will never done directly on Ubuntu. You should first install packages to run this command...:
sudo apt-get install libmagickwand-dev
...and then do install:
gem install rmagick
You may get the same issue, for that, Try clearing your apt repository and removing any broken packages first:
sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
If the system identifies any broken packages, forcefully remove them (replace package_name with your own):
sudo dpkg --remove -force --force-remove-reinstreq package_name
Then re-install any missing packages again. :)
An issue for me was that rmagick is out of date and not updated regularly. If you have too new of an ImageMagick version, then it might not be compatible. Check your version of ImageMagick using the following:
$ convert --version
If the ImageMagick version is > 7, it is not compatable with rmagick. The user will get errors such as
Can't install RMagick 2.16.0. Can't find MagickWand.h.
*** extconf.rb failed ***
Go back to version six of ImageMagick until they update rmagick to be compatible with version seven of ImageMagick. Someone has hosted the appropriate version(6) in a separate gem - 'imagemagick#6'.
If you need rmagick to work but currently have an imagemagick version 7 or higher, here are the steps to switch:
$ gem install imagemagick#6
$ brew unlink imagemagick
$ brew link imagemagick#6 --force
Helped me on Debian Wheezy 64bit
apt-get install libmagickcore-dev libmagickwand-dev
Try reinstalling both Imagemagick and PkgConfig. That should fix it for Mavericks
brew update && brew upgrade
brew reinstall imagemagick
brew reinstall pkgconfig
C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.7.7-6/include/ImageMagick gem install rmagick
I was really struggling with this on OS X Mountain Lion (after upgrading from Lion) and none of the suggestions regarding C_INCLUDE_PATH, PKG_CONFIG_PATH, ln'ing various files, etc., were working. On the same day I upgraded to Mountain Lion, I also upgraded XCode to 4.5.2, but I didn't really think too much of this.
Eventually I stopped trying to install RMagick and had to pass on the work to a colleague.
Then, by chance, I found that I was trying to use bundle install on another project and I wasn't able to install the json gem because "make" could not be found. I checked into that and found you need to go to XCode -> Preferences -> Downloads and install the command line tools to get make working again. The json gem installed fine.
Then I paused...and tried
gem install rmagick
One more time. It worked perfectly.
for a rails based application, I found this
sudo apt-get install -y libmagickwand-6-headers
C_INCLUDE_PATH=/usr/include/ImageMagick-6 gem install rmagick
bundle update rmagick
bundle install
worked on debian jessie
I ran into this because I'd run OS X's Migration Assistant and nothing was relinked after the migration. You need to check the output of Wand-config --ldflags --libs. In my case it gave:
$ Wand-config --ldflags --libs
/usr/local/bin/Wand-config: line 50: pkg-config: command not found
/usr/local/bin/Wand-config: line 53: pkg-config: command not found
After relinking pkg-config, libpng, and libfreetype, that became:
$ Wand-config --ldflags --libs
-L/usr/local/Cellar/imagemagick/6.8.8-9/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/usr/local/Cellar/imagemagick/6.8.8-9/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
And then:
$ gem install rmagick
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.2
Parsing documentation for rmagick-2.13.2
Done installing documentation for rmagick after 4 seconds
1 gem installed
In linux OS:
C_INCLUDE_PATH=/usr/local/include/ImageMagick-6/ gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/home/vagrant/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
...
Package MagickCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `MagickCore.pc'
then:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
in my .bashrc file to pick up MagickCore.pc, then created two symlinks:
ln -s /usr/local/include/ImageMagick/wand /usr/local/include/ImageMagick-6/wand
ln -s /usr/local/include/ImageMagick/magick /usr/local/include/ImageMagick-6/magick
Now:
$ gem install rmagick
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.2
1 gem installed
boom everything works fine.
At arch linux, after installing imagemagick#6, gem wasn't able to install package rmagick and got error below.
Can't install RMagick 2.16.0. Can't find MagickWand.h
Worked for me using below steps
added pkgconfig path to .bashrc
export PKG_CONFIG_PATH="/usr/lib/imagemagick6/pkgconfig"
Created two symlinks as below
ln -s /usr/include/ImageMagick-6/wand /usr/include/ImageMagick-6/wand
ln -s /usr/local/include/ImageMagick/magick /usr/include/ImageMagick-6/magick
There are some variants to this problem. Mostly the case is dealing with a legacy application that run older versions of ruby.
rmagick has a dependancy on imagemagick... but not just any. If you've gone too far ahead, it may be wise to backtrack:
brew uninstall imagemagick
Then proceed with an appropriate version
brew install imagemagick#6
then you path needs to be adjusted and forced upon homebrew
export PATH="/usr/local/opt/imagemagick#6/bin:$PATH"
brew link --force imagemagick#6
then you can install rmagick to most recent or versioned
gem install rmagick -v '2.15.4' --source 'https://rubygems.org/'
I had a hard time getting this same issue to work when I had a default ImageMagick install on OSX 10.8 (no homebrew or macports). No combination of the suggestions in this thread or threads linked to from this thread worked for me (modifying the paths for my local install of course).
I simply deleted the default ImageMagick 6 install, and then reinstalled with macports. My rmagick install worked immediately after with no other changes.
on OSX Maverick 10.9.1
it took me ages to figure it out but I solved these issues the following way:
nano /etc/paths
changed:
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
into:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
that that local stuff, like 'brew' is loaded first.
now I hit 'brew doctor' into the terminal, to see if there's something messed up
if you get the following output
Your system is ready to brew.
everthing is fine. if not ti will tell you what to do. Like kick out unbrewed stuff, broken libs, clean symlinks and whatnot.
When you are ready to brew, you need ghostscript(for pdfs), libpng, imagemagick via brew.
then you can happily type : 'gem install rmagick', in case you did't kill your ruby setup. But thats easy to reinstall via your cleaned up brew.
PS:
another helpful command is: 'which convert', to show you what version of imagemagick is used by the system.
as well as --version
so if you installed git via brew and do 'git --version' and it returns some apple git version, your load path is broken...
On Mac OS X 10.9, try to update your Xcode if there's a warning about it.
$ brew doctor
I you found some warning, do:
$ sudo /Developer/Library/uninstall-developer-folder
Then try:
$ bundle install
again
That worked fine for me.
On CentOS 6.5 x64, it was pretty easy:
yum install ImageMagick ImageMagick-devel
gem install rmagick -v '2.13.2'
I was able to fix this by upgrading to 2.13.2
All brew options failed to install rmagick 2.13.1 on yosemite 10.10
this worked
get the latest RVM
\curl -sSL https://get.rvm.io | bash -s stable --ruby
rvm install 2.1.1
rvm use 2.1.1
download and install the package file
http://cactuslab.com/imagemagick
(I used pacifist to install)
Confirm location of MagickCore.pc file
mdfind magickcore.pc
eg. /opt/ImageMagick/lib/pkgconfig/MagickCore.pc
Manually download rmagick-2.15.2.gem file
https://rubygems.org/gems/rmagick/versions/2.15.2
from that dir
sudo C_INCLUDE_PATH=/opt/ImageMagick/include/ImageMagick-6/ PKG_CONFIG_PATH=/opt/ImageMagick/lib/pkgconfig gem install --local rmagick-2.15.2.gem
If you are having issues with bundle installer still complaining about 2.13.1
In your gem file / gem.lock file upgrade ALL dependencies
rmagick (2.13.1) - > rmagick (>= 2.15.2)
Got same error for alpine 3.9 image build. It comes with ImageMagick 7.0.8.38-r0
To fix that you either use alpine 3.5 with ImageMagick 6.9.6.8-r1:
FROM alpine:3.5
Or install ImageMagick 6.9.6.8-r1 with package repository for 3.5:
RUN apk add imagemagick-dev=6.9.6.8-r1 --repository http://dl-3.alpinelinux.org/alpine/v3.5/main/
There is an open issue in rmagick repo regarding failed builds for ImageMagick 7.0.x. so hopefully it will be fixed soon.

Resources