我想用apt-get設置一個git服務器。下面是它如何去:設置git服務器時發生致命錯誤
# apt-get install git-core
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
linux-image-4.4.0-53-generic
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic
The following NEW packages will be installed:
git-core
0 upgraded, 1 newly installed, 2 to remove and 37 not upgraded.
8 not fully installed or removed.
Need to get 0 B/1,464 B of archives.
After this operation, 315 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 294882 files and directories currently installed.)
Removing linux-image-extra-4.4.0-53-generic (4.4.0-53.74) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-53-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.4.0-57-generic (4.4.0-57.78) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-57-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-57-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-53-generic
linux-image-extra-4.4.0-57-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
當我手動清除# apt-get remove linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic -y
,這裏是結果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic
0 upgraded, 0 newly installed, 2 to remove and 37 not upgraded.
7 not fully installed or removed.
After this operation, 315 MB disk space will be freed.
(Reading database ... 293795 files and directories currently installed.)
Removing linux-image-extra-4.4.0-53-generic (4.4.0-53.74) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-53-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-53-generic
WARNING: missing /lib/modules/4.4.0-53-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-53-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.4.0-57-generic (4.4.0-57.78) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-57-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-57-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-4.4.0-53-generic
linux-image-extra-4.4.0-57-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
這個問題已經讓我生氣太久。我該怎麼辦?非常感謝你!
我也試圖# apt-get install --reinstall
選項,但返回的錯誤如下:
# apt-get install --reinstall linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic && sudo apt-get purge linux-image-extra-4.4.0-53-generic linux-image-extra-4.4.0-57-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
linux-image-4.4.0-53-generic
Suggested packages:
fdutils linux-doc-4.4.0 | linux-source-4.4.0 linux-tools
linux-headers-4.4.0-53-generic
The following NEW packages will be installed:
linux-image-4.4.0-53-generic
0 upgraded, 1 newly installed, 2 reinstalled, 0 to remove and 37 not upgraded.
7 not fully installed or removed.
Need to get 0 B/94.3 MB of archives.
After this operation, 57.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package linux-image-4.4.0-53-generic.
(Reading database ... 293804 files and directories currently installed.)
Preparing to unpack .../linux-image-4.4.0-53-generic_4.4.0-53.74_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-53-generic (4.4.0-53.74) ...
Selecting previously unselected package linux-image-extra-4.4.0-53-generic.
Preparing to unpack .../linux-image-extra-4.4.0-53-generic_4.4.0-53.74_amd64.deb ...
Unpacking linux-image-extra-4.4.0-53-generic (4.4.0-53.74) over (4.4.0-53.74) ...
Selecting previously unselected package linux-image-extra-4.4.0-57-generic.
Preparing to unpack .../linux-image-extra-4.4.0-57-generic_4.4.0-57.78_amd64.deb ...
Unpacking linux-image-extra-4.4.0-57-generic (4.4.0-57.78) over (4.4.0-57.78) ...
Setting up linux-image-extra-4.4.0-62-generic (4.4.0-62.83) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-62-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-62-generic (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic:
linux-image-generic depends on linux-image-extra-4.4.0-62-generic; however:
Package linux-image-extra-4.4.0-62-generic is not configured yet.
dpkg: error processing package linux-image-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic:
linux-generic depends on linux-image-generic (= 4.4.0.62.65); however:
Package linux-image-generic is not configured yet.
dpkg: error processing package linux-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-lts-vivid:
linux-generic-lts-vivid depends on linux-generic; however:
Package linux-generic is not configured yet.
dpkg: error processing package linux-generic-lts-vivid (--configure):
dependency problems - leaving unconfigured
Setting up linux-image-4.4.0-57-generic (4.4.0-57.78) ...
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled
(4.4.0-57.78 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(4.4.0-57.78 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-57-generic /boot/vmlinuz-4.4.0-57-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-57-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-57-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-57-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-57-generic (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
Setting up linux-image-4.4.0-53-generic (4.4.0-53.74) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Not updating initrd symbolic links since we are being updated/reinstalled
(4.4.0-53.74 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(4.4.0-53.74 was configured last, according to dpkg)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-53-generic /boot/vmlinuz-4.4.0-53-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-53-generic
E: /usr/share/initramfs-tools/hooks/plymouth failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-53-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-53-generic.postinst line 1052.
dpkg: error processing package linux-image-4.4.0-53-generic (--configure):
subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-53-generic:
linux-image-extra-4.4.0-53-generic depends on linux-image-4.4.0-53-generic; however:
Package linux-image-4.4.0-53-generic is not configured yet.
dpkg: error processing package linux-image-extra-4.4.0-53-generic (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-extra-4.4.0-57-generic:
linux-image-extra-4.4.0-57-generic depends on linux-image-4.4.0-57-generic; however:
Package linux-image-4.4.0-57-generic is not configured yet.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
dpkg: error processing package linux-image-extra-4.4.0-57-generic (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-extra-4.4.0-62-generic
linux-image-generic
linux-generic
linux-generic-lts-vivid
linux-image-4.4.0-57-generic
linux-image-4.4.0-53-generic
linux-image-extra-4.4.0-53-generic
linux-image-extra-4.4.0-57-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
任何幫助嗎?
它與git無關,您可能需要在[Ask Ubuntu](http://askubuntu.com/)上詢問如何修復破損的軟件包iss ue –