Last active
November 25, 2023 23:42
-
-
Save lv10/487732f22513196f9f91c1e7119b5911 to your computer and use it in GitHub Desktop.
Install Vim 8 with Python, Python 3 support on Ubuntu 20.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you don't have any soon to be forgotten version of vim installed | |
$ sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
# Install Deps | |
$ sudo apt-get install build-essential cmake | |
$ sudo apt-get install python3-dev | |
#Optional: so vim can be uninstalled again via `dpkg -r vim` | |
$ sudo apt-get install checkinstall | |
$ sudo rm -rf /usr/local/share/vim /usr/bin/vim | |
$ cd ~ | |
$ git clone https://github.com/vim/vim | |
$ cd vim | |
$ git pull && git fetch | |
#In case Vim was already installed | |
$ make distclean && make clean | |
$ cd src | |
$ make distclean && make clean | |
$ cd .. | |
# Configure | |
$ `LDFLAGS="-rdynamic" ./configure \ | |
--enable-multibyte \ | |
--enable-python3interp \ | |
--with-python3-config-dir=/home/lv10/.pyenv/versions/3.8.6/lib/python3.8/config-3.8-x86_64-linux-gnu \ | |
--enable-cscope \ | |
--enable-largefile | |
# Install | |
$ make && sudo make install |
Thanks a lot!
I guess the backtip from line 26 is never closed in line 31?
I did not exactly follow this instruction. First, I did not use LDFLAGS=-rdynamic
and in a second run, I tried to use --enable-python3interp=dynamic
. The first one ended with a E370: Could not load library libpython3.11.so.1.0: libpython3.11.so.1.0: cannot open shared object file: No such file or directory
error, the second with a undefined symbol: PyByteArray_Type
error. So my advice is to stick to LDFLAGS=-rdynamic
as also mentioned here.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great!