BUILD FAILED error when installing ruby 2.4.3
Error occurred when installing ruby 2.4.3 on MacOS Big Sur 11.2.2
% rbenv install 2.4.3
Downloading openssl-1.1.1k.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/892a0875b9872acd04a9fde79b1f943075d5ea162415de3047c327df33fbaee5
Installing openssl-1.1.1k...
Installed openssl-1.1.1k to /Users/satou/.rbenv/versions/2.4.3
Downloading ruby-2.4.3.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.3.tar.bz2
Installing ruby-2.4.3...
WARNING: ruby-2.4.3 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
BUILD FAILED (macOS 11.2.2 using ruby-build 20210423)
Inspect or clean up the working tree at /var/folders/h3/4830l_xd6hj1msdhp0v_s3j40000gn/T/ruby-build.20210429133129.9166.uvvuHD
Results logged to /var/folders/h3/4830l_xd6hj1msdhp0v_s3j40000gn/T/ruby-build.20210429133129.9166.log
Last 10 log lines:
compiling fiber.c
linking shared-object fiber.bundle
compiling closure.c
closure.c:263:14: error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
result = ffi_prep_closure(pcl, cif, callback, (void *)self);
^
1 error generated.
make[2]: *** [closure.o] Error 1
make[1]: *** [ext/fiddle/all] Error 2
make: *** [build-ext] Error 2
solve
Solved by the following command
% RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC rbenv install 2.4.3
Read More:
- Ruby Install Error running ‘requirements_osx_brew_update_system ruby-2.3.1
- How to solve the error of “failed to create the Java virtual machine” in installing eclipse 2020-03 in MAC environment
- Solution to the problem of installing Tkinter module in MAC
- FreeSWITCH installation error “You must install libyuv-dev to build mod_fsv” solution
- Clion installing glfw_Using clion to configure Vulkan development environment on MacOS
- Installing VB6.0 under win7 (error accessing the ole Registry)
- Problems encountered in installing webpack (NPM error)
- [Solved] faiss Failed to install Error: No version of faiss found that meets the requirements
- [Solved] fbprophet Install Error: command ‘x86_64-apple-darwin13.4.0-clang‘ failed with exit status 254
- [Solved] Win10 install Ubuntu error: wslregisterdistribution failed with error: 0x8007019e
- Win10 installs ubuntu system, error WslRegisterDistribution failed with error: 0x8007019e
- [Solved] gocad2017 Install error: The installation of MSVC_2010_SP1_x64_32bit has failed.
- Macos: How to Solve cocoapods Install Error
- Mydumper Install Error: None of the required ‘glib-2.0’/’gthread-2.0’ found
- Mac: How to Install homebrew, nginx, PHP and MySQL
- Mac monterey Reinstall System Error: pkdownloaderror 8
- Bid for Kirin (Linux kernel) 7.0 compiler and installation sdl2.0 and QT using sdl2
- COLMAP Install Error: Undefined reference to libtiff4.0 [Solved]
- Yaml Install ERROR: Cannot uninstall ‘PyYAML’.
- How to Install FFmpeg on Linux