Can't Install Ffi -V '1.9.18' on MACos Catalina

Can't Install ffi -v '1.9.18' on macos Catalina

To get past that error, install ffi using:

gem install ffi -v '1.9.18' -- --with-cflags="-Wno-error=implicit-function-declaration"

Can't install `ffi -v 1.12.2` on mac OS Monterey

I have the same issue on M1 with ffi 1.15.5 and it works if I do:

gem install ffi -v '1.15.5' -- --with-cflags=-Wno-implicit-function-declaration

Same thing goes for ffi 1.12.2.

As far as I understand it (don't know C and googled this) - When C doesn’t find a function, it assumes it is implicitly declared and errors out. --with-cflags=-Wno-implicit-function-declaration tells the compiler to ignore any functions that are implicitly declared.

Issues building the libffi gem native extension when trying to install Jekyll on macOS Catalina

Aaaaaand I figured it out! Credit to @ffleming here. Here's what you need to do:

  1. reinstall libffi on brew using brew reinstall libffi
  2. add the new brew-installed libffi flags to your shell instance, e.g.
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"

  1. Run gem install jekyll and you should be sorted!

Cannot install Jekyll after updating to Catalina - An error occurred while installing ffi (1.9.18)

The root problem is that you cannot install one of jekyl's dependancies - specifically the ffi gem. Knowing that will better help you workout a fix.

You can see that this is the error by reading your bundle output. Learn how to read these so you can better help yourself in the future; If you were searching for "install ffi on macOS" you might have found more information available to you.

Give that you've just installed Catalina, it's likely that GCC isn't on your machine, or is outdated, or is unlinked.

Try running xcode-select --install to (re)install the Xcode command line tools.

ALSO - STOP USING SUDO

At the very top of your bundle output is a warning that you shouldn't use sudo when installing gems. It's good advice to follow!

Even better advice would be to use rbenv or rvm to create gem sets or environments for each ruby application you're working with. But, if you don't go all the way down that path, ** at least, stop using sudo**



Related Topics



Leave a reply



Submit