how to fix libffi missing in macos

Shell
# Add this in your .bash_profile.

export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig"
Source

Also in Shell: