I just updated to macOS High Sierra, and now installing erlang fails. It appears to be looking for a specific version of libjpeg, so I switched to that version with homebrew, but then it fails looking for the previous version.
I ran this: asdf install erlang 20.1, and got this:
LD ../priv/x86_64-apple-darwin17.2.0/wxe_driver.so
ld: file not found: /usr/local/opt/jpeg/lib/libjpeg.9.dylib for architecture x86_64
So I did a brew switch 9b, and verified:
$ ls /usr/local/opt/jpeg/lib/
libjpeg.9.dylib libjpeg.a libjpeg.dylib
I ran the install again and got this:
LD ../priv/x86_64-apple-darwin17.2.0/wxe_driver.so
ld: file not found: /usr/local/opt/jpeg/lib/libjpeg.8.dylib for architecture x86_64
Does anyone know why it would be looking for the wrong version?
I have no idea why, but brew unlink jpeg && brew link jpeg seems to have fixed it. 🤷♂️
I ran into the same issue installing 20.2 on High Sierra.
The fix is pretty hacky, but it works. I installed both jpeg 8 and 9 via homebrew. After installing both I see:
❯ brew info jpeg
jpeg: stable 9b (bottled)
Image manipulation library
http://www.ijg.org
/usr/local/Cellar/jpeg/8d (20 files, 709.5KB)
Built from source on 2018-01-17 at 12:20:37
/usr/local/Cellar/jpeg/9b (21 files, 723.8KB) *
Poured from bottle on 2018-01-17 at 12:15:53
And then manually linked jpeg 8, so both /usr/local/opt/jpeg/lib/libjpeg.9.dylib and /usr/local/opt/jpeg/lib/libjpeg.8.dylib are available:
sudo ln -s /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/opt/jpeg/lib/libjpeg.8.dylib
This worked for me:
wget -c http://www.ijg.org/files/jpegsrc.v8d.tar.gz
tar xzf jpegsrc.v8d.tar.gz
cd jpeg-8d
./configure
make
cp ./.libs/libjpeg.8.dylib /usr/local/opt/jpeg/lib
Most helpful comment
I ran into the same issue installing 20.2 on High Sierra.
The fix is pretty hacky, but it works. I installed both jpeg 8 and 9 via homebrew. After installing both I see:
And then manually linked jpeg 8, so both
/usr/local/opt/jpeg/lib/libjpeg.9.dyliband/usr/local/opt/jpeg/lib/libjpeg.8.dylibare available: