Install vim without X11 on FreeBSD

I can work with vi, but after using vim for years I just can’t work without it. The only problem is, if you install vim with pkg install vim it installs X11 and related crap.

This should be done as root.

First update portsnap:

# get it
portsnap fetch update

# extract it
portsnap extract

root@bsd-test:~ # cd /usr/ports/editors/vim
root@bsd-test:/usr/ports/editors/vim # ll
total 27
-rw-r--r--  1 root  wheel  7022 Sep 23 23:06 Makefile
-rw-r--r--  1 root  wheel   175 Sep 23 23:06 distinfo
drwxr-xr-x  2 root  wheel     6 Sep 28 14:25 files/
-rw-r--r--  1 root  wheel   601 Jun 14  2015 pkg-descr
-rw-r--r--  1 root  wheel  8897 Jan  9  2017 pkg-plist
root@bsd-test:/usr/ports/editors/vim # make WITHOUT_X11=yes install clean

For the option questions I only changed the first one to console and not using any graphic stuff.

It complained it couldn’t find perl5.24.3, so I installed it:

root@bsd-test:/usr/ports/editors/vim # cd /usr/ports/lang/perl5.24
root@bsd-test:/usr/ports/lang/perl5.24 # make install clean

# it crashed because ther was an old perl installed
root@bsd-test:/usr/ports/lang/perl5.24 # make reinstall

# when it was done I went back to the vim port and started the make again
root@bsd-test:/usr/ports/lang/perl5.24 # cd - 
root@bsd-test:/usr/ports/editors/vim # make WITHOUT_X11=yes install clean

Now you can use vim :-D

Cloud & Open-Source magician 🧙‍♂️

I try to find the KISS in complex systems and share it with the world.

comments powered by Disqus