Я пытаюсь установить git в Redhat6. Я следую how to install git этот учебник.Как установить последнюю версию git в Redhat 6.x/7.x
# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-2.0.5.tar.gz
# tar xzf git-2.0.5.tar.gz
# cd git-2.0.5
# 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
# git --version
Я могу клонировать репо и в состоянии загрузить файл zip zip. , но когда я выполняю эту команду.
make prefix=/usr/local/git all
Я получаю эту ошибку
[[email protected] git-2.0.5]# make prefix=/usr/local/git all
GIT_VERSION =2.0.5
* new build flags
CC credential-store.o /bin/sh: cc:
command not found make: *** [credential-store.o] Error 127
Как решить эту проблему?
Я могу установить git с помощью yum install git
. но по умолчанию 1.7.1 получает установку. Но я хочу установить выше 2.
Edit 1 Когда я выполнил
yum groupinstall 'Development Tools'
Это скачать необходимую зависимость и ушла выше ошибка.
Теперь, когда я исполняю этот make prefix=/usr/local/git all
Я получаю сообщение об ошибке сильфона
CC bulk-checkin.o
In file included from cache.h:4,
from bulk-checkin.h:7,
from bulk-checkin.c:4:
git-compat-util.h:213:25: warning: openssl/ssl.h: No such file or directory
git-compat-util.h:214:25: warning: openssl/err.h: No such file or directory
git-compat-util.h:320:25: warning: openssl/evp.h: No such file or directory
git-compat-util.h:321:26: warning: openssl/hmac.h: No such file or directory
git-compat-util.h:323:28: warning: openssl/x509v3.h: No such file or directory
In file included from bulk-checkin.h:7,
from bulk-checkin.c:4:
cache.h:11:21: warning: openssl/sha.h: No such file or directory
In file included from bulk-checkin.c:5:
csum-file.h:11: error: expected specifier-qualifier-list before ‘SHA_CTX’
csum-file.h:23: error: expected specifier-qualifier-list before ‘SHA_CTX’
bulk-checkin.c:96: error: expected declaration specifiers or ‘...’ before ‘SHA_CTX’
bulk-checkin.c: In function ‘stream_to_pack’:
bulk-checkin.c:128: warning: implicit declaration of function ‘SHA1_Update’
bulk-checkin.c:128: error: ‘ctx’ undeclared (first use in this function)
bulk-checkin.c:128: error: (Each undeclared identifier is reported only once
bulk-checkin.c:128: error: for each function it appears in.)
bulk-checkin.c: In function ‘deflate_to_pack’:
bulk-checkin.c:193: error: ‘SHA_CTX’ undeclared (first use in this function)
bulk-checkin.c:193: error: expected ‘;’ before ‘ctx’
bulk-checkin.c:205: warning: implicit declaration of function ‘SHA1_Init’
bulk-checkin.c:205: error: ‘ctx’ undeclared (first use in this function)
bulk-checkin.c:222: warning: passing argument 3 of ‘stream_to_pack’ makes integer from pointer without a cast
bulk-checkin.c:95: note: expected ‘int’ but argument is of type ‘off_t *’
bulk-checkin.c:222: error: incompatible type for argument 6 of ‘stream_to_pack’
bulk-checkin.c:95: note: expected ‘const char *’ but argument is of type ‘enum object_type’
bulk-checkin.c:222: warning: passing argument 7 of ‘stream_to_pack’ makes integer from pointer without a cast
bulk-checkin.c:95: note: expected ‘unsigned int’ but argument is of type ‘const char *’
bulk-checkin.c:222: error: too many arguments to function ‘stream_to_pack’
bulk-checkin.c:237: warning: implicit declaration of function ‘SHA1_Final’
make: *** [bulk-checkin.o] Error 1
make prefix=/usr/local/git install
Я получаю это
CC bulk-checkin.o
In file included from cache.h:4,
from bulk-checkin.h:7,
from bulk-checkin.c:4:
git-compat-util.h:213:25: warning: openssl/ssl.h: No such file or directory
git-compat-util.h:214:25: warning: openssl/err.h: No such file or directory
git-compat-util.h:320:25: warning: openssl/evp.h: No such file or directory
git-compat-util.h:321:26: warning: openssl/hmac.h: No such file or directory
git-compat-util.h:323:28: warning: openssl/x509v3.h: No such file or directory
In file included from bulk-checkin.h:7,
from bulk-checkin.c:4:
cache.h:11:21: warning: openssl/sha.h: No such file or directory
In file included from bulk-checkin.c:5:
csum-file.h:11: error: expected specifier-qualifier-list before ‘SHA_CTX’
csum-file.h:23: error: expected specifier-qualifier-list before ‘SHA_CTX’
bulk-checkin.c:96: error: expected declaration specifiers or ‘...’ before ‘SHA_CTX’
bulk-checkin.c: In function ‘stream_to_pack’:
bulk-checkin.c:128: warning: implicit declaration of function ‘SHA1_Update’
bulk-checkin.c:128: error: ‘ctx’ undeclared (first use in this function)
bulk-checkin.c:128: error: (Each undeclared identifier is reported only once
bulk-checkin.c:128: error: for each function it appears in.)
bulk-checkin.c: In function ‘deflate_to_pack’:
bulk-checkin.c:193: error: ‘SHA_CTX’ undeclared (first use in this function)
bulk-checkin.c:193: error: expected ‘;’ before ‘ctx’
bulk-checkin.c:205: warning: implicit declaration of function ‘SHA1_Init’
bulk-checkin.c:205: error: ‘ctx’ undeclared (first use in this function)
bulk-checkin.c:222: warning: passing argument 3 of ‘stream_to_pack’ makes integer from pointer without a cast
bulk-checkin.c:95: note: expected ‘int’ but argument is of type ‘off_t *’
bulk-checkin.c:222: error: incompatible type for argument 6 of ‘stream_to_pack’
bulk-checkin.c:95: note: expected ‘const char *’ but argument is of type ‘enum object_type’
bulk-checkin.c:222: warning: passing argument 7 of ‘stream_to_pack’ makes integer from pointer without a cast
bulk-checkin.c:95: note: expected ‘unsigned int’ but argument is of type ‘const char *’
bulk-checkin.c:222: error: too many arguments to function ‘stream_to_pack’
bulk-checkin.c:237: warning: implicit declaration of function ‘SHA1_Final’
make: *** [bulk-checkin.o] Error 1
И эти две линии
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
успешно выполнены
, но когда я типа git --version
я все еще получаю
Баш:/USR/BIN/мерзавца: Нет такого файл или справочник
ли вы запустить конфигурационный скрипт? Проверить 'echo $ CC' – hjpotter92
@ hjpotter92 Когда я запускаю' echo $ CC' или 'echo $ cc', я получаю пустую строку – Varun