Brew library version mismatch when running PHP

Viewed 3380

After installing the php71 package with Homebrew using brew install php71

I get this error when I run PHP:


dyld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib
  Referenced from: /usr/local/bin/php
  Reason: image not found
[1]    55097 abort      php -v

Running brew info jpeg I get this output:

jpeg: stable 9b (bottled)
Image manipulation library
http://www.ijg.org
/usr/local/Cellar/jpeg/9b (20 files, 724KB) *
  Poured from bottle on 2017-08-07 at 16:11:22
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/jpeg.rb

It looks like I need to install jpeg version 8b and not 9b; how can I do this?

2 Answers

All I needed to do was run this command:

export PATH=/usr/local/php5/bin:$PATH

This link was helpful.

Related