1.install ncurses library (vi depend on ncurses library)
./configure --prefix=/usr --with-termlib
make -j4 && make install
2.install vi
./configure --prefix=/usr --with-tlib=tinfo