-2

Installing vim8

epel role task:

---
- name: Install epel-release
  yum: name=epel-release state=latest
  become: yes

vim role task:

---
- name: Install vim
  yum: disablerepo=* enablerepo=epel update_cache=yes name=vim state=latest
  become: yes

error:

fatal: [DevBox]: FAILED! => {"changed": false, "failed": true, "msg": "No package matching 'vim' found available, installed or updated", "rc": 126, "results": ["No package matching 'vim' found available, installed or updated"]}

further research indicates epel doesn't contain vim8:

yum list | grep vim
vim-minimal.x86_64                      2:7.4.160-1.el7                @anaconda
beakerlib-vim-syntax.noarch             1.15-1.el7                     epel
fluxbox-vim-syntax.noarch               1.3.7-1.el7                    epel
golang-vim.noarch                       1.3.3-2.el7_0                  extras
protobuf-vim.x86_64                     2.5.0-8.el7                    base
vim-X11.x86_64                          2:7.4.160-1.el7_3.1            updates
vim-clustershell.noarch                 1.7.3-1.el7                    epel
vim-common.x86_64                       2:7.4.160-1.el7_3.1            updates
vim-enhanced.x86_64                     2:7.4.160-1.el7_3.1            updates
vim-filesystem.x86_64                   2:7.4.160-1.el7_3.1            updates
vim-go.x86_64                           1.8-3.el7                      epel
vim-gtk-syntax.noarch                   20130716-1.el7                 epel
vim-minimal.x86_64                      2:7.4.160-1.el7_3.1            updates
vim-vimoutliner.noarch                  0.3.7-5.el7                    epel
  • 1
    Run `yum search vim` - I see some indication it might be called something like `vim-enhanced`. Or just `yum install emacs`. ;-) – ceejayoz Apr 27 '17 at 13:53

3 Answers3

1

There is no package vim in EPEL or the base repo.

The base repo includes vim-minimal (or vim-enhanced or even vim-x11).

Sven
  • 98,649
  • 14
  • 180
  • 226
  • Your right, I was playing with ansible and it totally skipped my attention. Do you know any repo that has vim8 or do I've to compile it? –  Apr 27 '17 at 14:37
  • Ghettoforge is having it, according to http://pkgs.org – Sven Apr 27 '17 at 14:45
0

http://www.karan.org/blog/2016/11/05/vim-8-for-centos-linux-7/ provides a repo for this. You will need to add the repo first like so:

- name: Add repository
  yum_repository:
    name: epel
    description: EPEL YUM repo
    baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/

then you can install the package.

chicks
  • 3,793
  • 10
  • 27
  • 36
-1

Building vim8 directly from repo:

---
- name: Install libraries needed to make vim
  yum: name={{ item }} state=latest
  with_items:
    - gcc
    - ncurses-devel
  become: yes

- name: Clone vim
  git: repo=git://github.com/vim/vim.git
       dest=/tmp/vim
       version=v8.0.0586

- name: Make vim
  shell: "{{ item }}"
  args:
    chdir: /tmp/vim/src
  with_items:
    - make
    - make install
  become: yes