Linux(Crunchbang Linux - Debian 파생 버전)에 무언가를 설치하려고 하는데 mongodb-20gen을 가리키는 오류가 발생합니다.
다음 명령을 사용하여 제거하려고 하면:-
cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-10gen
나는 얻다...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mongodb-10gen
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 221 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 81657 files and directories currently installed.)
Removing mongodb-10gen ...
arg: remove
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--remove):
subprocess installed pre-removal script returned error exit status 100
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
MongoDB에 대한 유사한 오류에 대해 읽었으며 mongo-client를 제거하라는 제안을 받았으므로 다음을 시도했습니다.
cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-clients
그리고 얻었습니다 :-
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'mongodb-clients' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-10gen (2.4.6) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
schaiba의 제안에 따라 다음을 시도했습니다.
cometbill@Linuxn00b:~$ sudo apt-get install -f
그리고 얻었습니다 :-
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mongodb-10gen (2.4.6) ...
invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found.
dpkg: error processing mongodb-10gen (--configure):
subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
mongodb-10gen
E: Sub-process /usr/bin/dpkg returned an error code (1)
답변1
존재하지 않는다는 오류 메시지가 나오므로 /etc/init.d/mongodb
파일을 만들어 보십시오. 이 경우에는 진전을 이루기에 충분할 수 있습니다.
일반적으로 설치 또는 제거 스크립트가 실패하면 를 확인하세요 /var/lib/dpkg/info/$PACKAGE.{preinst,postinst,prerm,postrm}
. 쉘 스크립트인 경우 set -x
줄 아래에 추가하여 #!
추적을 인쇄합니다. 오류를 수정해야 하는 경우 스크립트를 편집하고 실행합니다 apt-get -f install
.
답변2
이 AskUbuntu 게시물문제를 해결했습니다. /var/lib/dpkg/status
문제를 일으키는 부분을 편집하고 삭제했습니다.