How to fix vim: ModuleNotFoundError: No module named '_ctypes' in Ubuntu

  1. 重装libffi-dev
    1
    sudo apt-get install libssl-dev openssl

or

1
2
3
4
5
6
7
8
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus
sudo apt-get install build-essential libncursesw5-dev libgdbm-dev libc6-dev
sudo apt-get install zlib1g-dev libsqlite3-dev tk-dev
sudo apt-get install libssl-dev openssl
sudo apt-get install libffi-dev
  1. 如果对于neovim的报错

    1
    2
    pip2 install --user --upgrade neovim
    pip3 install --user --upgrade neovim
  2. 仍然没有解决
    vim ~/.vimrc

    1
    2
    let g:python_host_prog  = '/root/.pyenv/shims/python3.7'
    let g:python3_host_prog = '/root/.pyenv/shims/python3.7'

Thank you for reading.
This post is copyrighted by Liyuliang’s Blog.
If reproduced, please indicate the source: Liyuliang’s Blog
This blog uses Creative Commons Attribution-NonCommercial-Share-Sharing 4.0 International License Agreement to license.


Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×