पर अपडेट क्यों नहीं हो रहा है मैं रेडहाट 6 पर हूं। मैं अपना गिट अपडेट करना चाहता हूं, मैंने कई तरीकों से प्रयास किया।मेरा गिट 1.7.1 से 1.9.4
1 विधि
$ यम अद्यतन Git। मुझे मिला: अद्यतन के लिए कोई पैकेज चिह्नित नहीं है।
2 विधि
$ wget http://git-core.googlecode.com/files/git-1.8.3.4.tar.gz
$ wget -O git-manpages-1.8.3.4.tar.gz http://code.google.com/p/git-core/downloads/detail?name=git-manpages-1.8.3.4.tar.gz&can=2&q=
Next, install all required libraries before building GIT:
$ sudo yum install zlib-devel perl-CPAN gettext
Now let’s untar and build and install GIT in the /usr directory:
$ tar xvfz git-1.8.3.4.tar.gz
$ cd git-1.8.3.4
$ ./configure
$ make
$ sudo make prefix=/usr install
$ git --version
git version 1.8.3.4
यह त्रुटि हुई।
[[email protected] ~]$ cd git-1.8.3.4
[[email protected] git-1.8.3.4]$ ./configure
configure: Setting lib to 'lib' (the default)
configure: Will try -pthread then -lpthread to enable POSIX Threads.
configure: CHECKS for site configuration
configure: CHECKS for programs
checking for cc... no
checking for gcc... no
configure: error: in `/home/qaserver/git-1.8.3.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
3 विधि
स्थापित जरूरी संकुल
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
डाउनलोड और संकलित Git स्रोत
# cd /usr/src
# wget https://www.kernel.org/pub/software/scm/git/git-1.9.4.tar.gz
# tar xzf git-1.9.4.tar.gz
डाउनलोड करने और Git स्रोत कोड निकालने के बाद, उपयोग आदेश के बाद स्रोत कोड
# cd git-1.9.4
# 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 or $ git version
फिर भी मैं हूँ हो रही ।
Git संस्करण 1.7.1
मैं पागल हो गया, यह किसी भी शरीर के साथ गलत क्या है पता नहीं है ???
यदि आपके पास पहले से ही आपके पथ पर 'गिट' है, तो '/ usr/local/git/bin' में एक नया संस्करण बनाना और पथ के अंत में यह जोड़ना होगा कि पुराने संस्करण को अभी भी पहले पाया गया है .. गिट 1.7.1 अनइंस्टॉल करने का प्रयास करें, या/usr/local/git –
के बजाय/usr/local में स्थापित करने के लिए बाइनरी कहां स्थित है, यह देखने के लिए 'कौन सी गिट' का उपयोग करें। इसके अलावा, 'बाश' कैश स्थान बाइनरी के स्थान को अनइंस्टॉल करने के बाद, या तो नया खोल खोलें या [यहां देखें] (http://unix.stackexchange.com/questions/5609/how-do-i-clear-bashs-cache -ऑफ-पथ-टू-एक्जिक्यूटिव्स) –
नया संस्करण 'पथ' में जोड़ा गया है। इसका मतलब है कि पुराने संस्करण को पहले निष्पादित किया जाता है। आपको 'पथ' में '/ usr/local/git/bin' प्रीपेड करना चाहिए। – alvits