【CentOS7】VIMをビルドする手順

 CentOS7で最新VIMをビルドするまでの手順をメモ
Rubyオプションとluaオプション、Lua拡張も使用(Python、Perlも)
(※Python3はconfigureが上手く行かなかったので断念。)

依存パッケージのインストール

ビルドに必要なもの

sudo yum groupinstall "Development tools"
sudo yum install yum-utils

Vimのソースが依存するもの

sudo yum-builddep vim
sudo yum lua-devel

luajitのビルド

GitReposというフォルダ名はなんでも構いません。

cd ~
mkdir GitRepos
cd GitRepos
git clone http://luajit.org/git/luajit-2.0.git
cd luajit-2.0
make
sudo make install

Vimのビルド

 準備ができたのでVimをビルドします。

①ソースのダウンロード

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

②configを作成する

cd vim/src
./configure \
 --prefix=/usr/local \
 --with-features=huge \
 --enable-multibyte \
 --enable-perlinterp \
 --enable-pythoninterp \
 --enable-rubyinterp \
 --enable-luainterp \
 --disable-gui \
 --with-luajit \
 --without-x \
 --enable-fail-if-missing

※詳しいオプションは下記のコマンドで参照できます。

./configure --help

makeしてインストール

make
sudo make install

動作確認

vim --version

vim: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory
というエラーが出た場合は.bash_profileに以下の記述を追加する。

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH

【補足】yum-builddepでインストールされるパッケージ

総ダウンロード容量: 42 M
インストール容量: 138 M
Downloading packages:
(1/124): SDL-1.2.15-14.el7.x86_64.rpm                      | 204 kB
(2/124): atk-2.14.0-1.el7.x86_64.rpm                       | 251 kB
(3/124): avahi-libs-0.6.31-17.el7.x86_64.rpm               |  61 kB
(4/124): atk-devel-2.14.0-1.el7.x86_64.rpm                 | 179 kB
(5/124): autoconf-2.69-11.el7.noarch.rpm                   | 701 kB
(6/124): cairo-devel-1.14.2-1.el7.x86_64.rpm               | 349 kB
(7/124): cairo-1.14.2-1.el7.x86_64.rpm                     | 711 kB
(8/124): desktop-file-utils-0.22-1.el7.x86_64.rpm          |  67 kB
(9/124): fontconfig-2.10.95-10.el7.x86_64.rpm              | 229 kB
(10/124): fontconfig-devel-2.10.95-10.el7.x86_64.rpm       | 128 kB
(11/124): fontpackages-filesystem-1.44-8.el7.noarch.rpm    | 9.9 kB
(12/124): freetype-devel-2.4.11-12.el7.x86_64.rpm          | 356 kB
(13/124): gdbm-devel-1.10-8.el7.x86_64.rpm                 |  47 kB
(14/124): gdk-pixbuf2-devel-2.31.6-3.el7.x86_64.rpm        | 216 kB
(15/124): gdk-pixbuf2-2.31.6-3.el7.x86_64.rpm              | 559 kB
(16/124): emacs-filesystem-24.3-19.el7_3.noarch.rpm        |  58 kB
(17/124): glib2-devel-2.46.2-4.el7.x86_64.rpm              | 459 kB
(18/124): expat-devel-2.1.0-10.el7_3.x86_64.rpm            |  57 kB
(19/124): cups-libs-1.6.3-26.el7.x86_64.rpm                | 356 kB
(20/124): gl-manpages-1.1-7.20130122.el7.noarch.rpm        | 994 kB
(21/124): gpm-libs-1.20.7-5.el7.x86_64.rpm                 |  32 kB
(22/124): graphite2-1.3.6-1.el7_2.x86_64.rpm               | 112 kB
(23/124): gpm-1.20.7-5.el7.x86_64.rpm                      | 183 kB
(24/124): gpm-devel-1.20.7-5.el7.x86_64.rpm                |  25 kB
(25/124): harfbuzz-0.9.36-1.el7.x86_64.rpm                 | 156 kB
(26/124): glibc-devel-2.17-157.el7_3.1.x86_64.rpm          | 1.1 MB
(27/124): gtk2-2.24.28-8.el7.x86_64.rpm                    | 3.4 MB
(28/124): harfbuzz-icu-0.9.36-1.el7.x86_64.rpm             |  11 kB
(29/124): hicolor-icon-theme-0.12-7.el7.noarch.rpm         |  42 kB
(30/124): jasper-libs-1.900.1-29.el7.x86_64.rpm            | 149 kB
(31/124): harfbuzz-devel-0.9.36-1.el7.x86_64.rpm           | 104 kB
(32/124): jbigkit-libs-2.0-11.el7.x86_64.rpm               |  46 kB
(33/124): libICE-devel-1.0.9-2.el7.x86_64.rpm              |  49 kB
(34/124): gtk2-devel-2.24.28-8.el7.x86_64.rpm              | 2.9 MB
(35/124): libICE-1.0.9-2.el7.x86_64.rpm                    |  65 kB
(36/124): libSM-1.2.2-2.el7.x86_64.rpm                     |  39 kB
(37/124): libSM-devel-1.2.2-2.el7.x86_64.rpm               |  13 kB
(38/124): libX11-1.6.3-3.el7.x86_64.rpm                    | 606 kB
(39/124): libXau-1.0.8-2.1.el7.x86_64.rpm                  |  29 kB
(40/124): libX11-devel-1.6.3-3.el7.x86_64.rpm              | 980 kB
(41/124): libXcomposite-0.4.4-4.1.el7.x86_64.rpm           |  22 kB
(42/124): libXau-devel-1.0.8-2.1.el7.x86_64.rpm            |  14 kB
(43/124): libX11-common-1.6.3-3.el7.noarch.rpm             | 162 kB
(44/124): libXcomposite-devel-0.4.4-4.1.el7.x86_64.rpm     |  16 kB
(45/124): libXcursor-1.1.14-2.1.el7.x86_64.rpm             |  30 kB
(46/124): libXcursor-devel-1.1.14-2.1.el7.x86_64.rpm       |  23 kB
(47/124): libXdamage-1.1.4-4.1.el7.x86_64.rpm              |  20 kB
(48/124): libXdamage-devel-1.1.4-4.1.el7.x86_64.rpm        | 9.7 kB
(49/124): libXfixes-5.0.1-2.1.el7.x86_64.rpm               |  18 kB
(50/124): libXext-devel-1.3.3-3.el7.x86_64.rpm             |  75 kB
(51/124): libXext-1.3.3-3.el7.x86_64.rpm                   |  39 kB
(52/124): libXfixes-devel-5.0.1-2.1.el7.x86_64.rpm         |  13 kB
(53/124): libXft-2.3.2-2.el7.x86_64.rpm                    |  58 kB
(54/124): libXi-1.7.4-2.el7.x86_64.rpm                     |  40 kB
(55/124): libXft-devel-2.3.2-2.el7.x86_64.rpm              |  19 kB
(56/124): libXi-devel-1.7.4-2.el7.x86_64.rpm               | 105 kB
(57/124): libXinerama-1.1.3-2.1.el7.x86_64.rpm             |  14 kB
(58/124): libXinerama-devel-1.1.3-2.1.el7.x86_64.rpm       |  13 kB
(59/124): glibc-headers-2.17-157.el7_3.1.x86_64.rpm        | 668 kB
(60/124): libXrandr-1.4.2-2.el7.x86_64.rpm                 |  26 kB
(61/124): libXpm-3.5.11-3.el7.x86_64.rpm                   |  54 kB
(62/124): libXrender-0.9.8-2.1.el7.x86_64.rpm              |  25 kB
(63/124): libXrandr-devel-1.4.2-2.el7.x86_64.rpm           |  21 kB
(64/124): libXrender-devel-0.9.8-2.1.el7.x86_64.rpm        |  16 kB
(65/124): libXt-devel-1.1.4-6.1.el7.x86_64.rpm             | 445 kB
(66/124): libXxf86vm-1.1.3-2.1.el7.x86_64.rpm              |  17 kB
(67/124): libXpm-devel-3.5.11-3.el7.x86_64.rpm             |  36 kB
(68/124): libXt-1.1.4-6.1.el7.x86_64.rpm                   | 173 kB
(69/124): libXxf86vm-devel-1.1.3-2.1.el7.x86_64.rpm        |  18 kB
(70/124): libattr-devel-2.4.46-12.el7.x86_64.rpm           |  35 kB
(71/124): libdb-devel-5.3.21-19.el7.x86_64.rpm             |  38 kB
(72/124): libacl-devel-2.2.51-12.el7.x86_64.rpm            |  71 kB
(73/124): libdrm-devel-2.4.67-3.el7.x86_64.rpm             | 114 kB
(74/124): libjpeg-turbo-1.2.90-5.el7.x86_64.rpm            | 134 kB
(75/124): kernel-headers-3.10.0-514.10.2.el7.x86_64.rpm    | 4.8 MB
(76/124): libpng-1.5.13-7.el7_2.x86_64.rpm                 | 213 kB
(77/124): libpng-devel-1.5.13-7.el7_2.x86_64.rpm           | 122 kB
(78/124): libselinux-devel-2.5-6.el7.x86_64.rpm            | 186 kB
(79/124): libsepol-devel-2.5-6.el7.x86_64.rpm              |  74 kB
(80/124): libthai-0.1.14-9.el7.x86_64.rpm                  | 187 kB
(81/124): libxcb-1.11-4.el7.x86_64.rpm                     | 189 kB
(82/124): libxcb-devel-1.11-4.el7.x86_64.rpm               | 1.1 MB
(83/124): libxshmfence-1.2-1.el7.x86_64.rpm                | 7.2 kB
(84/124): libyaml-0.1.4-11.el7_0.x86_64.rpm                |  55 kB
(85/124): libicu-devel-50.1.2-15.el7.x86_64.rpm            | 702 kB
(86/124): libtiff-4.0.3-27.el7_3.x86_64.rpm                | 170 kB
(87/124): linuxconsoletools-1.4.5-3.el7.x86_64.rpm         |  60 kB
(88/124): m4-1.4.16-10.el7.x86_64.rpm                      | 256 kB
(89/124): mesa-libEGL-devel-11.2.2-2.20160614.el7.x86_64.r |  28 kB
(90/124): mesa-libEGL-11.2.2-2.20160614.el7.x86_64.rpm     |  85 kB
(91/124): mesa-libGL-11.2.2-2.20160614.el7.x86_64.rpm      | 162 kB
(92/124): mesa-libGL-devel-11.2.2-2.20160614.el7.x86_64.rp | 149 kB
(93/124): libicu-50.1.2-15.el7.x86_64.rpm                  | 6.9 MB
(94/124): mesa-libgbm-11.2.2-2.20160614.el7.x86_64.rpm     |  42 kB
(95/124): mesa-libglapi-11.2.2-2.20160614.el7.x86_64.rpm   |  40 kB
(96/124): ncurses-devel-5.9-13.20130511.el7.x86_64.rpm     | 713 kB
(97/124): pango-1.36.8-2.el7.x86_64.rpm                    | 287 kB
(98/124): pcre-devel-8.32-15.el7_2.1.x86_64.rpm            | 479 kB
(99/124): pango-devel-1.36.8-2.el7.x86_64.rpm              | 319 kB
(100/124): perl-Data-Dumper-2.145-3.el7.x86_64.rpm         |  47 kB
(101/124): perl-ExtUtils-Embed-1.30-291.el7.noarch.rpm     |  50 kB
(102/124): perl-ExtUtils-Install-1.58-291.el7.noarch.rpm   |  74 kB
(103/124): perl-ExtUtils-MakeMaker-6.68-3.el7.noarch.rpm   | 275 kB
(104/124): perl-ExtUtils-Manifest-1.61-244.el7.noarch.rpm  |  31 kB
(105/124): perl-ExtUtils-ParseXS-3.18-2.el7.noarch.rpm     |  77 kB
(106/124): perl-Test-Harness-3.28-3.el7.noarch.rpm         | 302 kB
(107/124): perl-devel-5.16.3-291.el7.x86_64.rpm            | 453 kB
(108/124): pixman-0.34.0-1.el7.x86_64.rpm                  | 248 kB
(109/124): pixman-devel-0.34.0-1.el7.x86_64.rpm            |  20 kB
(110/124): pyparsing-1.5.6-9.el7.noarch.rpm                |  94 kB
(111/124): python-devel-2.7.5-48.el7.x86_64.rpm            | 393 kB
(112/124): ruby-2.0.0.648-29.el7.x86_64.rpm                |  68 kB
(113/124): ruby-devel-2.0.0.648-29.el7.x86_64.rpm          | 128 kB
(114/124): ruby-irb-2.0.0.648-29.el7.noarch.rpm            |  89 kB
(115/124): rubygem-bigdecimal-1.2.0-29.el7.x86_64.rpm      |  80 kB
(116/124): rubygem-io-console-0.4.2-29.el7.x86_64.rpm      |  51 kB
(117/124): rubygem-json-1.7.7-29.el7.x86_64.rpm            |  76 kB
(118/124): ruby-libs-2.0.0.648-29.el7.x86_64.rpm           | 2.8 MB
(119/124): rubygem-psych-2.0.0-29.el7.x86_64.rpm           |  78 kB
(120/124): rubygems-2.0.14.1-29.el7.noarch.rpm             | 216 kB
(121/124): rubygem-rdoc-4.0.0-29.el7.noarch.rpm            | 319 kB
(122/124): systemtap-sdt-devel-3.0-7.el7.x86_64.rpm        |  69 kB
(123/124): xorg-x11-proto-devel-7.7-13.el7.noarch.rpm      | 281 kB
(124/124): zlib-devel-1.2.7-17.el7.x86_64.rpm              |  50 kB
--------------------------------------------------------------------
合計                                              9.0 MB/s |  42 MB

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です