crasch (crasch) wrote,
crasch
crasch

GEEK: How to install ExifTool on Dreamhost

ExifTool is a Perl command line program for reading and writing metadata to binary files (.jpgs, .mpg, .doc, etc). Here’s how to install it on a Dreamhost-hosted account.

Create the following directories in your home directory:

$ cd ~$ mkdir usr/local$ cd usr/local$ mkdir -p bin build etc include info lib/perl5/man lib/perl5/man/man3 man  sbin src

Download the ExifTool tar file

$ cd ~/usr/local/src
$ curl -O  http://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-7.25.tar.gz

Untar the file:

$ tar xzvf Image-ExifTool-7.25.tar.gz

Create a file to contain the options to pass to the perl Makefile.PL

$ cd Image-ExifTool-7.25
$ vim perlmake

PREFIX=/home/crasch/usr/local \
INSTALLPRIVLIB=/home/crasch/usr/local/lib/perl5 \
INSTALLSCRIPT=/home/crasch/usr/local/bin \
INSTALLSITELIB=/home/crasch/usr/local/lib/perl5/site_perl \
INSTALLBIN=/home/crasch/usr/local/bin \
INSTALLMAN1DIR=/home/crasch/usr/local/lib/perl5/man \
INSTALLMAN3DIR=/home/crasch/usr/local/lib/perl5/man/man3

Make and install the code

$ perl Makefile.PL `cat /home/crasch/perlmake`
$ make
$ make test
$ make install 

If all goes well, you should see the following:

Installing /home/crasch/usr/local/lib/perl5/site_perl/Image/ExifTool.pm
[similar lines of output deleted for brevity]
Installing /home/crasch/usr/local/man/man3/Image::ExifTool::Minolta.3pm
Installing /home/crasch/usr/local/bin/exiftool
Writing /home/crasch/usr/local/lib/perl5/site_perl/auto/Image/ExifTool/.packlist
Appending installation info to /home/crasch/usr/local/lib/perl5/site_perl/perllocal.pod'

Add these lines to your .bash_profile:

HOME=/home/crasch
export PATH=$HOME/usr/local/bin:$PATH
export PERLLIB=$HOME/usr/local/lib/perl5/site_perl

Source the .bash_profile to update your paths:

$ source ~/.bash_profile

Original: craschworks - comments

Tags: uncategorized
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments