What is the difference between these two sets of commands when compiling and installing git?
我想大声告诉你
我想大声告诉你 2017-05-02 09:30:14
0
1
816

Compile and install git 2.8.0. Follow the steps in the official documentation. An error occurred during the installation. The installation steps are as follows:
Step 1:

$ sudo yum install curl-devel expat-devel gettext-devel     openssl-devel zlib-devel

Step 2:

$ sudo yum install asciidoc xmlto docbook2x

Step 3:

 $ tar -zxf git-2.8.0.tar.gz
  $ cd git-2.8.0
  $ make configure
  $ ./configure --prefix=/usr
  $ make all doc info
  $ sudo make install install-doc install-html install-info

The problem is when executing to make all doc info, the error message is as follows:


Anyway, the problem is related to docbook2x, and installing docbook2x separately shows that it has been installed:

[root@i001 git-2.8.0]# yum install docbook2x
Loaded plugins: axelget, langpacks
No metadata available for base
No metadata available for dockerrepo
No metadata available for elrepo
No metadata available for epel
No metadata available for extras
No metadata available for mariadb
No metadata available for nginx
No metadata available for remi
No metadata available for remi-php70
No metadata available for remi-php70-test
No metadata available for remi-safe
No metadata available for remi-test
No metadata available for rpmforge
No metadata available for rpmforge-extras
No metadata available for rpmforge-testing
No metadata available for salt-2015.8
No metadata available for updates
No package docbook2x available.
Error: Nothing to do

I tried 3 times, but the same error message was displayed. Then find a step on stackoverflow, as follows:
First step:

# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install  gcc perl-ExtUtils-MakeMaker

Step 2:

# yum remove git

Step 3:

# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.8.0.tar.gz
# tar xzf git-2.8.0.tar.gz

Step 4:

# cd git-2.8.0
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc

Step 5:

# git --version

git version 2.8.0

Follow this step and the installation is successful. The difference in the command is during compilation:
Successful

# make prefix=/usr/local/git all   

There is an error

$ make configure
$ ./configure --prefix=/usr
$ make all doc info

Question:
What is the difference between these two sets of commands?

我想大声告诉你
我想大声告诉你

reply all(1)
黄舟

The main difference is that the first command does not generate git help documents (man/info and the like), but the second command does, so it actually works when `make all
make all doc info之间的的区别),prefix只是指定一个目录前缀,在安装(make install`) and does not have much impact on the compilation process. These are explained in the INSTALL document.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template