LoginSignup
0
0

More than 3 years have passed since last update.

vagrant環境でCentOS7のgitを2.xにアップデートする【備忘録】

Posted at

概要

CentOS7内のGitのバージョンが古いため2.xにアップデートしたい。

開発環境

macOS:Mojave
Vagrant:2.2.9
CentOS:7.8

きっかけ

VSCODEを用いてvagrant環境下のファイルをremote直接いじれるようにしたい。
しかし、Vagrant下のファイルをVSCODEを開いた際にGitのバージョンが古いのでアップデートしてねと言われてしまう。

cf.【VagrantでVScodeのRemote Developmentを使おう!】
https://qiita.com/hppRC/items/9a46fdb4af792a454921

やったこと

Qiita等でいくつか参考となる記事が見られたが

インストール時に接続切れになりインストール出来ない。
or

sudo make prefix=/usr/local all
sudo make prefix=/usr/local install

のところでいずれもエラーとなってしまう。

解決策

海外の記事を参考に、以下の3つのコードを実行することでバージョンアップできた

sudo yum remove git*
sudo yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
sudo yum install git

cf.
https://computingforgeeks.com/how-to-install-latest-version-of-git-git-2-x-on-centos-7/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0