【发布时间】:2013-07-28 17:10:08
【问题描述】:
尝试根据Installing Git博客上的说明在Unix和Linux机器上安装git,但失败并出现以下错误
make prefix=/usr/local all
GIT_VERSION = 1.8.3.4
* new build flags
CC credential-store.o
In file included from cache.h:4,
from credential-store.c:1:
git-compat-util.h:221:25: warning: openssl/ssl.h: No such file or directory
git-compat-util.h:222:25: warning: openssl/err.h: No such file or directory
In file included from credential-store.c:1:
cache.h:11:21: warning: openssl/sha.h: No such file or directory
cache.h:19:18: warning: zlib.h: No such file or directory
In file included from credential-store.c:1:
cache.h:21: syntax error before "z_stream"
cache.h:21: warning: no semicolon at end of struct or union
cache.h:28: syntax error before '}' token
cache.h:28: warning: type defaults to `int' in declaration of `git_zstream'
cache.h:28: warning: data definition has no type or storage class
cache.h:30: syntax error before '*' token
cache.h:31: syntax error before '*' token
cache.h:32: syntax error before '*' token
cache.h:33: syntax error before '*' token
cache.h:35: syntax error before '*' token
cache.h:36: syntax error before '*' token
cache.h:37: syntax error before '*' token
cache.h:38: syntax error before '*' token
cache.h:39: syntax error before '*' token
cache.h:40: syntax error before '*' token
cache.h:41: syntax error before '*' token
cache.h:42: syntax error before '*' token
cache.h:769: syntax error before '*' token
make: *** [credential-store.o] Error 1
我知道这是因为缺少 openssl 库,但我无法获取这些库。
我的机器上没有 yum/apt-get 来按照建议运行以下命令:
$ yum install curl-devel expat-devel gettext-devel \
openssl-devel zlib-devel
$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
如何在这些机器上获取这些库。这些机器无法访问互联网,如果需要,我可以做一个 scp。任何建议。
【问题讨论】:
-
软件安装相关的问题更适合Super User。您还应该提供有关您的操作系统、包管理等的详细信息...
-
如果您能告诉我们您的操作系统,我们或许可以为您指明 Git 的规范下载位置,无论是否受包管理。对于流行平台上的流行包,您几乎不需要自己编译任何东西(例如 Gentoo,其中在本地编译是包管理架构的一部分)。
-
您可能希望在
make之前运行configure。
标签: git