Skip to content

How To: Install libexif and exif on Windows

Michael Tenetko edited this page Mar 19, 2018 · 2 revisions

Synopsis

The exif gem cannot be installed on Windows without preparations, because it requires libexif library and there is no simple way to install libexif on Windows. This article gives a step-by-step guide to install libexif on Windows properly.

This solution has been tested on Windows 10 x64 and Ruby 2.4.3-2-x64 from RubyInstaller.

Steps

  1. Download and install Ruby from RubyInstaller.

  2. Run:

ridk install

and press Enter.

  1. Install MSYS2 (note the installation directory, c:\msys64 by default).

  2. Wait until ridk finishes installing and updating packages.

  3. Go to the MSYS2 directory and run

C:\msys64>msys2_shell.cmd
  1. Update all packages:
$ pacman -Syu
  1. Find libexif package:
$ pacman -Ss libexif

This command will give you the exact name of the libexif package, for example, mingw-w64-x86_64-libexif.

  1. Install libexif:
$ pacman -S mingw-w64-x86_64-libexif
  1. Quit the MSYS2 console and install exif gem from Windows console:
C:\>gem install exif
Clone this wiki locally