'libffi.so.6: cannot open shared object file in rails
I'm newbie in rails and I'm working on Ubuntu 19.10 yesterday I decide to upgrade my OS to new version every things is going fine after upgrading finished after t i start to use my computer to develop that found any rails command not works and showed me this error
in `require': libffi.so.6: cannot open shared object file: No such file or directory - /home/ace/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/ffi-1.13.1/lib/ffi_c.so (LoadError)
I found people with same issues but none of them have problem in rails and any of them is useful for me .
I think the problem is about libffi.so.6 package because ffi-1.13.1 is installed on my OS
Solution 1:[1]
gem pristine ffi did not help for me. The more invasive
gem uninstall ffi
gem install ffi
did the job.
Solution 2:[2]
Adding gem "ffi", github: "ffi/ffi" to my Gemfile fixed it
Solution 3:[3]
it requires you to rebuild when you switch rubies.
Annoyingly, it seems like it also seems to fail into this message even when installed and you also try to use
byebugdebugger. (It does this for me even when the ffi binary is otherwise installed-- and taking out thebyebugdebugger does not fall into this ffi error)
Using ruby/debug seems to work
Solution 4:[4]
My error was libffi 8 on ubuntu 20.04 for rails 6.1.4
https://github.com/ffi/ffi#requirements solved my issue
--enable-system-libffi : Force usage of system libffi
--disable-system-libffi : Force usage of builtin libffi
--enable-libffi-alloc : Force closure allocation by libffi
--disable-libffi-alloc : Force closure allocation by builtin method
Solution 5:[5]
Here's what helped me:
- Drop your project's vendor/cache folder
bundle install
Solution 6:[6]
My Haskell notes say a fresh installation goes like this:
- Install chocolatey as administrator. There should be no errors returned. Run 'choco' to ensure that the installation worked.
- Install stack
- choco install haskell-dev
- refreshenv
On Windows, the new compiler is stored here: C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.10.1\bin. If it does not work as the default compiler, it could be masked by an earlier entry in the path list.
When you run which, PowerShell get-command what does it return? What is your path set to?
If no joy, you could search for an online Haskell REPL. Try this one:
https://replit.com/languages/haskell. You can enter code on the left hand side, and run it, or start the REPL with ghci on the right hand side. It's a bit clunky by comparison to a full IDE, but perhaps enough to get started with.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | codener |
| Solution 2 | |
| Solution 3 | Jason FB |
| Solution 4 | Ram on Rails React Native |
| Solution 5 | Marat |
| Solution 6 | Francis King |
