Problem with giflib 5.2.1

I just started getting an error with ogr2ogr, which uses giflib, recently updated to 5.2.1. The error goes away if I downgrade to the previous giflib version of 5.1.4.

Here’s what shows up in console when I attempt to run ogr2ogr in a script:

2019-11-19 13:01:49 dyld: Library not loaded: /usr/local/opt/giflib/lib/libgif.7.dylib
2019-11-19 13:01:49   Referenced from: /usr/local/bin/ogr2ogr
2019-11-19 13:01:49   Reason: Incompatible library version: ogr2ogr requires version 8.0.0 or later, but libgif.7.dylib provides version 0.0.0



Also bitten by this. I was upgrading homebrew and broke my QGIS. In fixing it, I broke my GDAL

Mine seems ok after I reverted to 5.1.4.

brew install giflib@5.1.4

Where’s the error though? Is it giflib or does gdal need an upgrade?

Now it says:

No available formula with the name "giflib@5.1.4"