2013-09-10 33 views
2

我試圖在Linux中安裝東西(Crunchbang Linux - Debian的派生),而我mongodb-20gen出錯。MongoDB錯誤:mongodb-10gen E:子進程/ usr/bin/dpkg返回錯誤代碼(1)

當我嘗試刪除它使用: -

[email protected]:~$ 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的類似的錯誤,並建議刪除蒙戈的客戶端,所以,我想: -

[email protected]:~$ 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) 
+0

這可能是更多的東西了問Ubuntu或者服務器故障,我知道你沒有運行ubunut但嘗試:http://askubuntu.com/questions/195950/package- system-broken-e-sub-process-usr-bin-dpkg-returned-an-error-code-1 – Sammaye

+0

@Sammaye將你的評論添加爲答案。我試了一下,似乎有效。 – cometbill

回答

8

這是一個難以擺脫的狀態。你應該能夠完成刪除,如果你創建一個假的初始化腳本:

sudo touch /etc/init.d/mongodb 
sudo chmod 755 /etc/init.d/mongodb 
0

根據你的問題,這個過程將在行中斷。

invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. 

您必須製造假文件,

sudo touch /etc/init.d/mongodb 
sudo chmod 755 /etc/init.d/mongodb 

和工藝將完成。

2

MongoDB的V3.4

sudo touch /etc/init.d/mongod 
sudo chmod 755 /etc/init.d/mongod 
相關問題