Too*_*ool 12 linux git installation build
我从https://github.com/git/git下载了git源代码作为zip文件.
我将它解压缩到/ home/Desktop/denis/git(使用Ubuntu).
现在这里的教程说我应该跑
./configure --prefix=/home/denis/git-static CFLAGS="${CFLAGS} -static"
Run Code Online (Sandbox Code Playgroud)
从上面提到的文件夹作为构建git的一步.
但git源似乎没有配置文件在我的根文件夹中我可以运行(只有configure.ac,我怀疑它不是我正在寻找的).
我在这里错过了什么?如何手动构建git?
我这样做是因为我试图让git在共享托管服务器上工作,我无法安装git.
其他答案对我不起作用。也许他们会为别人。对我有用的是:
使用以下命令:
git clone git@github.com:git/git.git
mkdir git-static
cd git
./configure prefix=/path/to/git-static/ CFLAGS="${CFLAGS} -static"
make
make install
Run Code Online (Sandbox Code Playgroud)
这将在git-static
目录中留下几个文件夹,但可执行文件是静态链接的。它也比平时大得多(可能大 1.5 MB)。
Bel*_*zer -7
阅读解压文件根文件夹中的INSTALL文件,里面似乎有一些有用的指令,我怀疑:
或者,您可以使用 autoconf 生成的 ./configure 脚本来设置安装路径(通过 config.mak.autogen),这样您就可以编写
$ make configure ;# as yourself
$ ./configure --prefix=/usr ;# as yourself
$ make all doc ;# as yourself
# make install install-doc install-html;# as root
Run Code Online (Sandbox Code Playgroud)
或者只是简单地:
$ make prefix=/usr all doc info ;# as yourself
# make prefix=/usr install install-doc install-html install-info ;# as root
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5759 次 |
最近记录: |