
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
問題の原因となった部分を編集して削除しました。