zoukankan      html  css  js  c++  java
  • 树莓派4 安装vim8.2 编译python3支持

    主机版本:树莓派4b
    操作系统:Linux raspberrypi 5.10.52-v7l+ #1440 SMP Tue Jul 27 09:55:21 BST 2021 armv7l GNU/Linux


    预处理

    先确保卸载vim

    sudo apt-get remove vim vim-tiny vim-common vim-runtime
    sudo apt-get autoremove
    

    确保依赖库安装

    sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git
    
    

    编译和安装

    下载源码

    cd ~
    git clone https://github.com/vim/vim.git
    cd vim
    

    配置编译(我选择的是python3版本,根据python实际的地址进行配置)

    ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.7/config-3.7m-arm-linux-gnueabihf --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscope --prefix=/usr/local
    

    如果配置编译python2则

    ./configure --with-features=huge --enable-multibyte --enable-rubyinterp=yes --enable-pythoninterp=yes --with-python-config-dir=/usr/lib/python2.7/config-arm-linux-gnueabihf --enable-perlinterp=yes --enable-luainterp=yes --enable-gui=gtk2 --enable-cscope --prefix=/usr/local
    

    开始编译

    make VIMRUNTIMEDIR=/usr/local/share/vim/vim8.2
    

    安装

    sudo make install
    

    设置vim作为你的默认编辑器

    sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
    sudo update-alternatives --set editor /usr/local/bin/vim
    sudo update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
    sudo update-alternatives --set vi /usr/local/bin/vim
    

    查看版本

    vim --version 
    

    看python3前是否有“+”号,如果有,就对了;

  • 相关阅读:
    将16进制的颜色值变成UIColor
    验证邮箱地址方法
    iOS 推送通知详解
    在UITextView中添加placeholder
    移除所有子视图removeAllSubviews
    如何书写高质量的jQuery代码
    reset.css
    CSS3笔记
    10个可以直接拿来用的JQuery代码片段
    js定时器
  • 原文地址:https://www.cnblogs.com/chencarl/p/15083663.html
Copyright © 2011-2022 走看看