Based on so many operations, I found that the ubuntu system needs to upgrade and clean up some packages after it is installed. Otherwise, the subsequent installation of various software will not be smooth, various problems may occur.
The package upgrade and cleanup operations are simple. You only need to execute the following two commands:
Apt-get-f install # used to upgrade some mutually dependent packages apt-get autoremove # used to delete some outdated packages
However, sometimes some problems may occur when you execute the above command. The most common problem is that the disk is full. In this case, you can run the following command to manually delete outdated packages and clear some space, then run the preceding command.
dpkg -r linux-image-generic-lts-quantaldpkg -r linux-image-3.5.0-*-genericdpkg --purge linux-image-3.5.0-*-generic
Below I once encountered a variety of related errors, can refer to the next (http://blog.csdn.net/yongsheng0550 ):
Q1:
Apt-get install dh-make checkinstall
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Checkinstall: Dependency: dpkg-dev but it will not be installed
Recommendation: make, but it will not be installed
Dh-make: Dependency: debhelper (> = 8) but it will not be installed
Dependency: make, but it will not be installed
Dependency: dpkg-dev but it will not be installed
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q2:
Apt-get install dh-make checkinstall make dpkg-dev
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Dh-make: Dependency: debhelper (> = 8) but it will not be installed
Dpkg-dev: Dependency: libdpkg-perl (= 1.16.1.2ubuntu7.2) but it will not be installed
Dependency: binutils but it will not be installed
Recommended: gcc, but it will not be installed or
C-compiler
Recommendation: build-essential
Recommendation: fakeroot, but it will not be installed
Recommendation: libalgorithm-merge-perl, but it will not be installed
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q3:
Apt-get install dh-make checkinstall make dpkg-dev debhelper libdpkg-perl binutils gcc build-essential fakeroot libalgorithm-merge-perl
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Build-essential: Dependency: libc6-dev, but it will not be installed or
Libc-dev
Dependency: g ++ (> =. 4.3) but it will not be installed
Debhelper: Dependency: html2text but it will not be installed
Dependency: po-debconf, but it will not be installed
Dependency: dh-apparmor, but it will not be installed
Gcc: Dependency: cpp (>=4:4. 6.3-1ubuntu5) but it will not be installed
Dependency: gcc-4.6 (> = 4.6.3-1 ~) But it will not be installed
Recommended: libc6-dev but it will not be installed or
Libc-dev
Libalgorithm-merge-perl: Dependency: libalgorithm-diff-perl but it will not be installed
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q4:
Apt-get install libc6-dev
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Libc6-dev: Dependency: libc-dev-bin (= 2.15-0ubuntu10. 5)
Dependency: linux-libc-dev, but it will not be installed
Recommended: gcc, but it will not be installed or
C-compiler
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q5:
Apt-get install libc6-dev gcc
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Gcc: Dependency: cpp (>=4:4. 6.3-1ubuntu5) but it will not be installed
Dependency: gcc-4.6 (> = 4.6.3-1 ~) But it will not be installed
Libc6-dev: Dependency: libc-dev-bin (= 2.15-0ubuntu10. 5)
Dependency: linux-libc-dev, but it will not be installed
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q6:
Apt-get install libc6-dev (gcc cpp linux-libc-dev)
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Cpp: Dependency: cpp-4.6 (> = 4.6.3-1 ~) But it will not be installed
Gcc: Dependency: gcc-4.6 (> = 4.6.3-1 ~) But it will not be installed
Libc6-dev: Dependency: libc-dev-bin (= 2.15-0ubuntu10. 5)
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q7:
Apt-get install libc6-dev gcc cpp linux-libc-dev cpp-4.6 libc-dev-bin
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the following errors:
The following software packages have dependencies that are not met:
Cpp-4.6: Dependency: libmpc2 but it will not be installed
Dependency: libmp Fr4 (> = 3.1.0) but it will not be installed
Gcc-4.6: Dependency: binutils (> = 2.21.1) but it will not be installed
Dependency: libgomp1 (> = 4.6.3-1ubuntu5) but it will not be installed
Dependency: libquadmath0 (> = 4.6.3-1ubuntu5) but it will not be installed
Dependency: libmpc2 but it will not be installed
Dependency: libmp Fr4 (> = 3.1.0) but it will not be installed
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it will not be installed
E: The dependency is not satisfied. Run "apt-get-f install" without specifying the software package name (you can also specify a solution ).
Q8:
Apt-get-f install
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
Correcting dependency... finished
The following software packages are automatically installed and are not required now:
Linux-headers-3.5.0-39-generic linux-headers-3.5.0-34 linux-headers-3.5.0-37 linux-headers-3.5.0-39 linux-headers-3.5.0-34-generic
Use 'apt-get autoremove 'to uninstall them.
The following additional software packages will be installed:
Linux-image-3.5.0-45-generic
Recommended software packages:
Fdutils linux-lts-quantal-doc-3.5.0 linux-lts-quantal-source-3.5.0 linux-lts-quantal-tools
The following [new] software packages will be installed:
Linux-image-3.5.0-45-generic
0 software packages are upgraded, 1 new software package is installed, 0 software packages are to be uninstalled, and 71 software packages are not upgraded.
Nine software packages are not fully installed or uninstalled.
Download the software package 0 B/40.6 MB.
After decompression, 157 MB of extra space is consumed.
Do you want to continue? [Y/n] y
(Reading the database... the system currently has 288805 files and directories installed .)
Extracting linux-image-3.5.0-45-generic (from.../linux-image-3.5.0-45-generic_3.5.0-45.68 ~ Precise1_amd64.deb )...
Done.
Dpkg: Processing/var/cache/apt/archives/linux-image-3.5.0-45-generic_3.5.0-45.68 ~ An error occurred while precise1_amd64.deb (-- unpack:
When it is./boot/System. map-3.5.0-45-generic, dpkg-deb is written as a buffer copy at the backend. Failed: there is no space on the device
The error message indicates that this is because the disk is full and no apport report is written.
Dpkg-deb: error: subprocess paste was killed by signal (disconnected pipe)
Examining/etc/kernel/postrm. d.
Run-parts: executing/etc/kernel/postrm. d/initramfs-tools 3.5.0-45-generic/boot/vmlinuz-3.5.0-45-generic.
Run-parts: executing/etc/kernel/postrm. d/zz-update-grub 3.5.0-45-generic/boot/vmlinuz-3.5.0-45-generic
An error occurred during processing:
/Var/cache/apt/archives/linux-image-3.5.0-45-generic_3.5.0-45.68 ~ Precise1_amd64.deb
E: Sub-process/usr/bin/dpkg returned an error code (1)
Q9:
Apt-get install linux-image-3.5.0-45-generic for linux-image-generic-lts-quantal
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
Linux-image-generic-lts-quantal is the latest version.
The following software packages are automatically installed and are not required now:
Linux-headers-3.5.0-39-generic linux-headers-3.5.0-34 linux-headers-3.5.0-37 linux-headers-3.5.0-39 linux-headers-3.5.0-34-generic
Use 'apt-get autoremove 'to uninstall them.
Recommended software packages:
Fdutils linux-lts-quantal-doc-3.5.0 linux-lts-quantal-source-3.5.0 linux-lts-quantal-tools
The following [new] software packages will be installed:
Linux-image-3.5.0-45-generic
0 software packages are upgraded, 1 new software package is installed, 0 software packages are to be uninstalled, and 71 software packages are not upgraded.
Nine software packages are not fully installed or uninstalled.
Download the software package 0 B/40.6 MB.
After decompression, 157 MB of extra space is consumed.
Do you want to continue? [Y/n] Y
(Reading the database... the system currently has 288805 files and directories installed .)
Extracting linux-image-3.5.0-45-generic (from.../linux-image-3.5.0-45-generic_3.5.0-45.68 ~ Precise1_amd64.deb )...
Done.
Dpkg: Processing/var/cache/apt/archives/linux-image-3.5.0-45-generic_3.5.0-45.68 ~ An error occurred while precise1_amd64.deb (-- unpack:
When it is./boot/System. map-3.5.0-45-generic, dpkg-deb is written as a buffer copy at the backend. Failed: there is no space on the device
The error message indicates that this is because the disk is full and no apport report is written.
Dpkg-deb: error: subprocess paste was killed by signal (disconnected pipe)
Examining/etc/kernel/postrm. d.
Run-parts: executing/etc/kernel/postrm. d/initramfs-tools 3.5.0-45-generic/boot/vmlinuz-3.5.0-45-generic.
Run-parts: executing/etc/kernel/postrm. d/zz-update-grub 3.5.0-45-generic/boot/vmlinuz-3.5.0-45-generic
An error occurred during processing:
/Var/cache/apt/archives/linux-image-3.5.0-45-generic_3.5.0-45.68 ~ Precise1_amd64.deb
E: Sub-process/usr/bin/dpkg returned an error code (1)
Q10:
Apt-get autoremove
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
You may need to run "apt-get-f install" to correct the above error.
The following software packages have dependencies that are not met:
Linux-image-generic-lts-quantal: Dependency: linux-image-3.5.0-45-generic but it has not been installed
E: The dependency cannot be satisfied. Try the-f option.