-bash: git: command not found 报错,linux的git指令安装

方法1 yum

yum install git 

还是报错


There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

   /data/anaconda3/envs/python38/lib/liblzma.so.5: version `XZ_5.1.2alpha' not found (required by /lib64/librpmio.so.3)

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.5 (default, Nov 16 2020, 22:23:17) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq
  

方法2 conda

conda是一个开源的包、环境管理器,可以用于在同一个机器上安装不同版本的软件包及其依赖,并能够在不同的环境之间切换
conda安装方式非常强大,能自动安装底层的相关依赖

conda install git

安装成功

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    bzip2-1.0.8                |       h7f98852_4         484 KB  conda-forge
    c-ares-1.18.1              |       h7f98852_0         113 KB  conda-forge
    curl-7.83.1                |       h7bff187_0          89 KB  conda-forge
    expat-2.4.8                |       h27087fc_0         187 KB  conda-forge
    gettext-0.19.8.1           |    hf34092f_1004         3.6 MB  conda-forge
    git-2.37.0                 | pl5321h36853c3_0        13.7 MB  conda-forge
    keyutils-1.6.1             |       h166bdaf_0         115 KB  conda-forge
    krb5-1.19.3                |       h3790be6_0         1.4 MB  conda-forge
    libcurl-7.83.1             |       h7bff187_0         342 KB  conda-forge
    libev-4.33                 |       h516909a_1         104 KB  conda-forge
    libiconv-1.16              |       h516909a_0         1.4 MB  conda-forge
    libnghttp2-1.47.0          |       h727a467_0         808 KB  conda-forge
    libnsl-2.0.0               |       h7f98852_0          31 KB  conda-forge
    libssh2-1.10.0             |       ha56f1ee_2         233 KB  conda-forge
    pcre2-10.37                |       h032f7d1_0         1.1 MB  conda-forge
    perl-5.32.1                | 2_h7f98852_perl5        14.4 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        38.0 MB

The following NEW packages will be INSTALLED:

  bzip2              conda-forge/linux-64::bzip2-1.0.8-h7f98852_4
  c-ares             conda-forge/linux-64::c-ares-1.18.1-h7f98852_0
  curl               conda-forge/linux-64::curl-7.83.1-h7bff187_0
  expat              conda-forge/linux-64::expat-2.4.8-h27087fc_0
  gettext            conda-forge/linux-64::gettext-0.19.8.1-hf34092f_1004
  git                conda-forge/linux-64::git-2.37.0-pl5321h36853c3_0
  keyutils           conda-forge/linux-64::keyutils-1.6.1-h166bdaf_0
  krb5               conda-forge/linux-64::krb5-1.19.3-h3790be6_0
  libcurl            conda-forge/linux-64::libcurl-7.83.1-h7bff187_0
  libev              conda-forge/linux-64::libev-4.33-h516909a_1
  libiconv           conda-forge/linux-64::libiconv-1.16-h516909a_0
  libnghttp2         conda-forge/linux-64::libnghttp2-1.47.0-h727a467_0
  libnsl             conda-forge/linux-64::libnsl-2.0.0-h7f98852_0
  libssh2            conda-forge/linux-64::libssh2-1.10.0-ha56f1ee_2
  pcre2              conda-forge/linux-64::pcre2-10.37-h032f7d1_0
  perl               conda-forge/linux-64::perl-5.32.1-2_h7f98852_perl5

猜你喜欢

转载自blog.csdn.net/qq_15821487/article/details/125708557
今日推荐