Saya mencoba untuk menghapus paket tempat saya menghapus /etc/init.d/disco-master
file (dalam upaya untuk menghapus paket secara manual). Saya ingin menghapus disco-master
paket. Bagaimana saya melakukan ini sekarang?
Inilah yang terjadi ketika saya melakukannya sudo apt-get remove disco-master
:
removing disco-master ...
invoke-rc.d: unknown initscript, /etc/init.d/disco-master not found.
dpkg: error processing disco-master (--remove):
subprocess installed pre-removal script returned error exit status 100
Errors were encountered while processing:
disco-master
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ketika saya melakukannya sudo apt-get install --reinstall disco-master
saya mendapatkan yang berikut:
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
disco-master : Depends: disco-node (= 0.4.2+nmu1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Ketika saya melakukannya sudo apt-get -f install
saya mendapatkan ini:
Unpacking disco-node (from .../disco-node_0.4.2+nmu1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/disco-node_0.4.2+nmu1_amd64.deb (--unpack):
trying to overwrite '/usr/lib/disco/master/ebin/disco.app', which is also in package disco-master 0.4.1
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/disco-node_0.4.2+nmu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ketika saya menjalankan sudo apt-get remove disco-node
saya mendapatkan yang berikut:
Package disco-node is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
disco-master : Depends: disco-node (= 0.4.1) but it is not going to be installed
Depends: python-disco (= 0.4.1) but 0.4.2+nmu1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Ketika saya melakukannya sudo dpkg -P --force-all disco-master
saya mendapat:
Removing disco-master ...
invoke-rc.d: unknown initscript, /etc/init.d/disco-master not found.
dpkg: error processing disco-master (--purge):
subprocess installed pre-removal script returned error exit status 100
Errors were encountered while processing:
disco-master
sudo dpkg -P --force-all disco-master
.Jawaban:
Buat skrip init dummy untuk mengelabui dpkg:
Masukkan berikut:
Simpan file, atur izin eksekusi (
sudo chmod 755 /etc/init.d/disco-master
) dan cobasudo apt-get remove disco-master
lagi.sumber
post-removal script returned error exit status 1
.. Jadi, saya menemukan skrip/var/lib/dpkg/info/{package}.postrm
itu, memeriksanya untuk memverifikasi bahwa saya telah melakukan hal-hal di dalamnya (menghapus konfigurasi / file dll), kemudian mengubahnya ke atas .. BEKERJA IT .. Apt bekerja lagi . Luar biasa. : D