Apt-Get으로 Git 설치 오류


11

Ubuntu 11.04의 서버 배포에 git을 설치하려고하면 오류가 발생합니다. 다음 명령을 사용했습니다.

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

그리고 이제 apt가 완전히 고장났습니다. dpkg를 업데이트하려고 시도했습니다. 오래된 버전이 몇 개라는 것을 알았 기 때문입니다. git을 설치할 수 없기 때문에 실패했습니다. apt-get purge, apt-get clean 및 apt-get update를 시도했습니다. 여전히 같은 문제입니다. git을 제거하려고 시도했으며 이것을 얻었습니다.

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 끝났습니다.
— 다니엘 빙햄

이 질문에 대한 현상금을 시작하기 전에 얼마나 기다려야합니까? 나는 이것에 대한 대답이 정말로 빨리 필요하다 :(
— Daniel Bingham

문제는 명쾌한 설치해야하지만 단정 한에서 (사이 코디로 업그레이드하지 않고) 패키지를 설치하려고 때문인 것으로 볼
— ajmitch

@ajmitch 오, 그거 알아? 나는 다시 한 번했다. natty 저장소에 있지만 업그레이드되지 않은 vim의 업그레이드 된 버전이 필요했으며 전체 업데이트를 처리하고 싶지 않았습니다. 상기시켜 주셔서 감사합니다!
— Daniel Bingham

답변:


5

경우에 따라서 : 그것은 apt-get install git-core아닙니다 apt-get install git.


1
언제 바뀌 었는지 확실하지 않지만 git-core뿐만 아니라 git도 작동해야합니다. 물론 단정 한에서, 자식 패키지는 정말 자식이다
— 해미 다우 너

10.04 이후로해야했는데 git-core그렇지 않으면 같은 오류 메시지가 나타납니다.
— Marc-André Appel

아뇨, 같은 오류입니다.
— 다니엘 빙햄

설명 git-core은 "폐기 됨"이라고합니다.
— Louis Waweru

1
원래이 git패키지는 GNU Interactive Tools 용 패키지였으며 실제로는 아무도 사용하지 않았습니다. 현재 git는 Git VCS를 참조하며 git-core더 이상 사용되지 않습니다.
— Jörg W Mittag

5

좋아, 나는 그것을 고쳤다. 패키지를 수동으로 제거한 다음 dpkg가 강제로 지워 져야했습니다. 그 후 git-core에서 설치했는데 정상적으로 작동했습니다. 패키지를 수동으로 제거하려면

/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을 설치할 수 있었고 git정상적으로 작동했습니다.


나는 같은 문제에 부딪 쳤고 이것은 나를 위해 그것을 고쳤다.
— John Fiala
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.