Apt-Get के साथ Git इंस्टॉल करने में त्रुटि


11

जब मैं Ubuntu 11.04 के सर्वर वितरण पर गिट स्थापित करने का प्रयास करता हूं, तो मुझे एक त्रुटि मिलती है। मैंने निम्नलिखित कमांड का उपयोग किया:

sudo apt-get install git

और इससे यह त्रुटि उत्पन्न हुई:

(Reading database ... 
dpkg: warning: files list file for package `git' missing, assuming package has no files currently installed.
(Reading database ... 20310 files and directories currently installed.)
Preparing to replace git 1:1.7.4.1-3 (using .../git_1%3a1.7.4.1-3_i386.deb) ...
/var/lib/dpkg/tmp.ci/preinst: 12: dpkg-maintscript-helper: not found
dpkg: error processing /var/cache/apt/archives/git_1%3a1.7.4.1-3_i386.deb (--unpack):
 subprocess new pre-installation script returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 14: dpkg-maintscript-helper: not found
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/git_1%3a1.7.4.1-3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

मैं निम्नलिखित रिपॉजिटरी का उपयोग कर रहा हूं:

# deb cdrom:[Ubuntu 8.04.3 _Hardy Heron_ - Release i386 (20090713.1)]/ hardy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://us.archive.ubuntu.com/ubuntu/ natty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ natty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted


## main & restricted repositories
# deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted

#deb http://security.ubuntu.com/ubuntu lucid-security main restricted
#deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted

## universe repositories
#deb http://us.archive.ubuntu.com/ubuntu/ lucid universe
#deb-src http://us.archive.ubuntu.com/ubuntu/ lucid universe
#deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe restricted main
#deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates universe

#deb http://security.ubuntu.com/ubuntu lucid-security universe
#deb-src http://security.ubuntu.com/ubuntu lucid-security universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ natty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ natty universe
deb http://us.archive.ubuntu.com/ubuntu/ natty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ natty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ natty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ natty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates multiverse

किसी को भी पता है कि क्या हो रहा है या मैं इसे कैसे ठीक कर सकता हूं और स्थापित करने के लिए गिट प्राप्त कर सकता हूं?

[संपादित करें] यहां apt-cache पॉलिसी का आउटपुट dpkg है:

dpkg:
  Installed: 1.15.5.6ubuntu4
  Candidate: 1.16.0~ubuntu7.1
  Version table:
     1.16.0~ubuntu7.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty-updates/main Packages
     1.16.0~ubuntu7 0
        500 http://us.archive.ubuntu.com/ubuntu/ natty/main Packages
 *** 1.15.5.6ubuntu4 0
        100 /var/lib/dpkg/status

और अब एप्ट पूरी तरह से टूट गया है। मैंने dpkg को अपडेट करने का प्रयास किया, क्योंकि मैंने देखा कि यह कुछ पुराने संस्करण थे। यह विफल हो गया क्योंकि यह गिट स्थापित नहीं कर सका। मैंने apt-get purge, apt-get clean और apt-get update का प्रयास किया। अभी भी वही समस्या है। मैंने जीआईटी हटाने का प्रयास किया और यह मिला:

Removing git-core ...
dpkg: error processing git (--remove):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting a removal.
Errors were encountered while processing:
 git
E: Sub-process /usr/bin/dpkg returned an error code (1)

1
क्या आप कृपया अपना प्रश्न संपादित कर सकते हैं और 'apt-cache policy dpkg' का आउटपुट जोड़ सकते हैं?
अंजिच

@ajmitch यह किया जाता है।
डैनियल बिंगहैम

मुझे इस प्रश्न के लिए एक इनाम शुरू करने से पहले कितने समय तक इंतजार करना होगा? मुझे वास्तव में जल्द ही इसके उत्तर की आवश्यकता है :(
डैनियल बिंगहैम

आपकी समस्याएं इसलिए दिखती हैं क्योंकि आपके पास एक चमकदार स्थापित है, लेकिन
नैट्टी

@ajmitch ओह तुम्हें पता है क्या? मैंने कुछ समय पहले ऐसा किया था। मुझे विम के अपग्रेडेड वर्जन की जरूरत थी जो कि नैट रिपॉजिटरी में था, लेकिन आकर्षक नहीं था और मैं एक पूर्ण अपडेट से निपटना नहीं चाहता था। मुझे याद दिलाने के लिये धन्यवाद!
डैनियल बिंगहैम

जवाबों:


5

बस के मामले में: यह apt-get install git-coreसिर्फ नहीं है apt-get install git


1
मुझे यकीन नहीं है कि जब यह बदल गया है, लेकिन गिट को भी काम करना चाहिए, न कि सिर्फ गिट-कोर। निश्चित रूप से नैट्टी में, git पैकेज वास्तव में git है
Hamish Downer

10.04 के बाद से मुझे करना था git-core, अन्यथा मुझे वही त्रुटि संदेश मिला।
मार्क-आंद्रे एपेल

नहीं, एक ही त्रुटि।
डैनियल बिंगहैम

git-core"अप्रचलित" का वर्णन है ।
लुई वावरू

1
मूल रूप से, gitपैकेज GNU इंटरएक्टिव टूल्स के लिए था, जो कि वास्तव में उपयोग करता है। आजकल, gitGit VCS को संदर्भित करता है, और git-coreपदावनत किया जाता है।
डब्ल्यू पर Jörg W Mittag

5

ठीक है, मैंने इसे ठीक कर लिया। मुझे पैकेज को मैन्युअल रूप से निकालना पड़ा और फिर खुद को खाली करने के लिए dpkg को मजबूर करना पड़ा। बाद में मैंने इसे गिट-कोर से स्थापित किया और यह ठीक काम किया। मैं जिस पैकेज में गया था उसे मैन्युअल रूप से हटाने के लिए

/var/cache/apt/archives

और git_1%3a1.7.4.1-3_i386.debफाइल निकाल दी । उसके बाद मैं गया

/var/lib/dpkg/info

और एक किया ls | grep gitऔर सब कुछ हटा दिया जो बदल गया। बाद में, मैं भाग गया

sudo dpkg --remove --force-remove-reinstreq git

पैकेज के dpkg को साफ करने के लिए। एक बार जो किया गया था मैं पैकेज के git-coreबजाय गिट स्थापित करने में सक्षम था gitऔर यह ठीक काम किया।


मैं उसी समस्या में भाग गया और इसने मेरे लिए भी इसे ठीक कर दिया।
जॉन फियाला
हमारी साइट का प्रयोग करके, आप स्वीकार करते हैं कि आपने हमारी Cookie Policy और निजता नीति को पढ़ और समझा लिया है।
Licensed under cc by-sa 3.0 with attribution required.