Import Error: libffi.so.6: cannot open shared object file: No such file or directory

TL;DR This is the solution when Jupyter notebook fails to start because the file libffi.so.6 could not be imported. In my environment, pyenv was used to manage the version of python, so it is for those who manage it in the same way.

Error

% jupyter notebook
Import Error: libffi.so.6: cannot open shared object file: No such file or directory

Solution

From here [^ 1]

% pyenv version
i.j.k(set by $HOME/.pyenv/versions/i.j.k)
% pyenv install i.j.k
Installed Python-i.j.k to $HOME/.pyenv/versions/i.j.k

All you have to do is reinstall the version of Python you were using. You should now be able to boot.

Recommended Posts

Import Error: libffi.so.6: cannot open shared object file: No such file or directory
Cannot import cv2 (libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory)
NO MORE “cd: foo: No such file or directory”
No such file or directory:'chromedriver': Resolve'chromedriver'
pip install --upgrade pip will result in No such file or directory
-bash: ./ {file name} .sh: /usr/bin/bash: bad interpreter: No such file or directory
Addressed "Python .h: No such file or directory" when installing uWSGI with Python 3.8
[Note] How to deal with unicode error and No such file or directory (output table to excel file with pandas)
What to do when [Errno 2] No such file or directory appears in Python
What to do if ENOENT: no such file or directory appears during npm install
EC2 / Amazon Linux2: What to do if you get an "unable to execute'gcc': No such file or directory" error with pip install
When I try to run the pip command after updating pip, I get "No such file or directory"
After installing Anaconda3, I get the error "zsh: no such file or directory:/opt/anaconda3/bin/conda" in the command line preferences.