centos 7インストールgitエラーNo such file or directory


Downloading packages:


Error downloading packages:
  perl-Git-1.8.3.1-13.el7.noarch: [Errno 5] [Errno 2] No such file or directory
  perl-TermReadKey-2.30-20.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
  1:perl-Error-0.17020-2.el7.noarch: [Errno 5] [Errno 2] No such file or directory
  git-1.8.3.1-13.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
  rsync-3.1.2-4.el7.x86_64: [Errno 5] [Errno 2] No such file or directory
  libgnome-keyring-3.12.0-1.el7.x86_64: [Errno 5] [Errno 2] No such file or directory

git各バージョン圧縮パッケージダウンロードアドレス

  • ダウンロード
  • wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.21.0.tar.gz
    
    [root@renshen ~]# wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.21.0.tar.gz
    --2019-04-18 17:52:23--  https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.21.0.tar.gz
    Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.101.1, 2604:1380:2001:3900::1
    Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.101.1|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 8289375 (7.9M) [application/x-gzip]
    Saving to: ‘git-2.21.0.tar.gz’
    
    100%[=================================================>] 8,289,375   1.69MB/s   in 4.7s   
    
    2019-04-18 17:52:30 (1.69 MB/s) - ‘git-2.21.0.tar.gz’ saved [8289375/8289375]
    
  • を表示
    [root@renshen ~]# ll
    total 8116
    drwxr-xr-x 3 root root    4096 Jan 25 11:58 data
    -rw-r--r-- 1 root root 8289375 Feb 25 02:15 git-2.21.0.tar.gz
    
  • 解凍
  • tar -zxvf  git-2.21.0.tar.gz
    
  • 取付
  • cd git-2.21.0
    ./configure --prefix=/usr/local/git
    make
    make install
    
  • 新しくインストールされたgitバージョン番号を表示する:
  • [root@renshen ~]#  /usr/local/git/bin/git --version
    git version 2.21.0
    
  • 便利後使用、建軟接続
  • ln -s /usr/local/git/bin/* /usr/bin/
    
    [root@renshen ~]# git --version
    git version 2.21.0