Skip to content

Instantly share code, notes, and snippets.

@ttback
Last active August 29, 2015 14:02
Show Gist options
  • Save ttback/6a04a130c3d5b9b80950 to your computer and use it in GitHub Desktop.
Save ttback/6a04a130c3d5b9b80950 to your computer and use it in GitHub Desktop.
Install libvips on Amazon EC2
LIBVIPS_FULL_VERSION=7.40.2
LIBVIPS_MAJOR_VERSION=echo $LIBVIPS_VERSION | sed 's/v//g' | sed 's/[^.]*$//' | sed 's/[.| ]*$//g'
curl -o vips-build.tar.gz http://www.vips.ecs.soton.ac.uk/supported/$LIBVIPS_MAJOR_VERSION/vips-$LIBVIPS_FULL_VERSION.tar.gz
mkdir vips-build && tar -xf vips-build.tar.gz -C vips-build --strip-components=1
cd vips-build
./configure
make && sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
export LD_RUN_PATH=/usr/local/lib
@bradisbell
Copy link

Could you provide more context around how you use this script? I'm trying to get it to work with Elastic Beanstalk with the Amazon Linux AMI, and I end up missing packages:

configure: error: Package requirements (glib-2.0 >= 2.6 gmodule-2.0 libxml-2.0 gobject-2.0) were not met:

No package 'glib-2.0' found
No package 'gmodule-2.0' found
No package 'libxml-2.0' found
No package 'gobject-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables REQUIRED_CFLAGS
and REQUIRED_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make: *** No targets specified and no makefile found.  Stop.

Thank you!

@ttback
Copy link
Author

ttback commented Jul 1, 2014

I haven't tried this with a brand new AMI instance. My script only works on my own environment with bootstrap work already done.
You prob need to either try a different AMI ID(if already latest, then ignore this) or install those dep libs in your bootstrap scripts.
The tricks I wanted to remember here was that I had to export those LD_'s to my PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment